Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contribute the WordLift Vector Store #13028

Merged
merged 39 commits into from May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
287ddd6
created main structure of the package
ossaleon Mar 25, 2024
9a41faa
unit test main structure, example notebook draft
ossaleon Apr 3, 2024
65a38ef
unit tests, fixed generated apis
ossaleon Apr 4, 2024
cf68a0d
excluded client code from precommit
ossaleon Apr 8, 2024
d98b3a1
testing exclusion of api client
ossaleon Apr 8, 2024
9800df6
refactored test to pass ruff hook
ossaleon Apr 8, 2024
5e01411
changed test names
ossaleon Apr 8, 2024
8271f84
exclude manager client from pre-commit-config
ossaleon Apr 8, 2024
ae0f23b
update vector store, change folder structure
ossaleon Apr 11, 2024
56b3681
added init to utils
ossaleon Apr 11, 2024
51b65c9
removed async from query function
ossaleon Apr 15, 2024
27003b4
updated example notebook
ossaleon Apr 15, 2024
f0ac272
pointed developers to wordlift website in example notebook
ossaleon Apr 15, 2024
360017d
Merge branch 'run-llama:main' into feature/12107-add-support-for-the-…
ossaleon Apr 18, 2024
5d532e4
Merge branch 'main' of github.com:wordlift/llama_index into feature/1…
ziodave Apr 20, 2024
02b082e
Merge branch 'feature/12107-add-support-for-the-wordlift-vector-store…
ziodave Apr 20, 2024
9fcd917
Merge branch 'main' of github.com:wordlift/llama_index into feature/1…
ziodave Apr 22, 2024
05fa5a2
Merge pull request #1 from wordlift/feature/12107-add-support-for-the…
ziodave Apr 22, 2024
5c92602
Merge branch 'main' of https://github.com/run-llama/llama_index into …
ziodave Apr 23, 2024
873f2e3
added readme, updated tests
ossaleon May 9, 2024
17e3e04
add readme
ossaleon May 13, 2024
275aba5
removed references to specific embedding model
ossaleon May 13, 2024
229d754
Merge branch 'main' of https://github.com/run-llama/llama_index into …
ossaleon May 15, 2024
3ac0e7a
Merge commit '05fa5a2'
ziodave May 15, 2024
d4138e9
Merge branch 'main' of github.com:wordlift/llama_index into feature/1…
ziodave May 15, 2024
8f14bf5
Typo in Readme
ossaleon May 15, 2024
a1d6664
Merge branch 'main' of https://github.com/wordlift/llama_index into f…
ossaleon May 15, 2024
86b1c48
Merge branch 'feature/12107-add-support-for-the-wordlift-vector-store…
ossaleon May 15, 2024
2157853
correct typo
ossaleon May 15, 2024
9278817
changed logo url
ossaleon May 15, 2024
915eec3
Merge pull request #3 from wordlift/feature/12107-add-support-for-the…
ziodave May 15, 2024
dadfd29
fix build file
ossaleon May 15, 2024
3bca729
fix build file
ossaleon May 15, 2024
b7a46bc
add missing dep
ziodave May 15, 2024
40e1f12
add other missing dep
ossaleon May 15, 2024
49b57cb
add other missing dep
ossaleon May 15, 2024
839af8d
Merge pull request #4 from wordlift/feature/12107-add-support-for-the…
ziodave May 15, 2024
c3a2ee2
Merge branch 'main' of https://github.com/run-llama/llama_index
ziodave May 17, 2024
a980d31
send metadata with the node request
ziodave May 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Expand Up @@ -2,6 +2,8 @@
default_language_version:
python: python3

exclude: "llama-index-integrations/vector_stores/llama-index-vector-stores-wordlift/manager_client/.*"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand Down
@@ -0,0 +1,153 @@
llama_index/_static
.DS_Store
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
bin/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
etc/
include/
lib/
lib64/
parts/
sdist/
share/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
.ruff_cache

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints
notebooks/

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
pyvenv.cfg

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Jetbrains
.idea
modules/
*.swp

# VsCode
.vscode

# pipenv
Pipfile
Pipfile.lock

# pyright
pyrightconfig.json
@@ -0,0 +1,3 @@
poetry_requirements(
name="poetry",
)
@@ -0,0 +1,17 @@
GIT_ROOT ?= $(shell git rev-parse --show-toplevel)

help: ## Show all Makefile targets.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'

format: ## Run code autoformatters (black).
pre-commit install
git ls-files | xargs pre-commit run black --files

lint: ## Run linters: pre-commit (black, ruff, codespell) and mypy
pre-commit install && git ls-files | xargs pre-commit run --show-diff-on-failure --files

test: ## Run tests via pytest.
pytest tests

watch-docs: ## Build and watch documentation.
sphinx-autobuild docs/ docs/_build/html --open-browser --watch $(GIT_ROOT)/llama_index/
@@ -0,0 +1,24 @@
<picture>
<img alt="#WordLift" width="200" src="https://wordlift.io/wp-content/uploads/2022/12/logo.svg" style="margin-bottom: 25px;">
</picture>

# LlamaIndex Vector_Stores Integration: WordLift

WordLift is an AI-powered SEO platform. With our AI we build your own knowledge graph for your business with entities marked up by the different topics, categories and regions. Using this graph, search engines will be able to understand the structure of your content faster and more precisely. To access a WordLift key and unlock our AI-powered SEO tools, visit [WordLift](https://wordlift.io/).

This integration enables the use of WordLift as a vector store for LlamaIndex, allowing you to work with your knowledge graph directly from your codebase.

## Features

- Perform retrieval-augmented generation (RAG) using your knowledge graph data directly in your codebase.
- Add new nodes and search within your knowledge graph effortlessly.

## Usage

Please refer to the [notebook](./examples/wordlift_vector_store_demo.ipynb) for usage of WordLift as vector store in LlamaIndex.

WordLift Knowledge Graphs are built on the principles of fully Linked Data, where each entity is assigned a permanent dereferentiable URI.\
When adding nodes to an existing Knowledge Graph, it's essential to include an "entity_id" in the metadata of each loaded document.\
For further insights into Fully Linked Data, explore these resources:
[W3C Linked Data](https://www.w3.org/DesignIssues/LinkedData.html),
[5 Star Data](https://5stardata.info/en/).
@@ -0,0 +1,5 @@
What I Worked On

February 2021

Before college the two main things I worked on, outside of school, were writing and programming. I didn't write essays. I wrote what beginning writers were supposed to write then, and probably still are: short stories. My stories were awful. They had hardly any plot, just characters with strong feelings, which I imagined made them deep.