I wrote a small tool for SurrealDB over the weekend, just for fun, to learn more about SurrealDB and LangChain agents.
I could not locate much information about SurrealDB on StackOverflow and ChatGPT. I found information on the SurrealDB documentation, available at -> https://surrealdb.com/docs. I wanted to create a tool that would allow me to ask questions about how to perform certain queries in SurrealDB, and receive precise answers with references.
- Use SurrealDB documentation from GitHub
- Convert ember.js hbs templates and code snippets into markdown
- Built a search index on top of the markdown with code
- Enable queries about Surreal DB features.
- Simple Question and Answer (QA) retrieval chain
- Conv retrieval chain
- Agent retrieval
Since SurrealDB is an active project, I've set up the pipeline to re-run once every day!
I am using SurrealDB itself as a Vector DB! Cool - yeah! Check out my LangChain <> SurrealDB integration!
Export OPEN AI token
export OPENAI_API_KEY=*******
Run SurrealDB (We are using it as vector store for our index)
docker run --rm --pull always -p 8000:8000 surrealdb/surrealdb:latest start
Install python dependencies
python -m venv .env
source .env/bin/activate
pip install -r requirements.txt
To run dagster UI
dagit -f dosc_retrieval_pipeline.py