Closed iwilltry42 closed 1 month ago
Comparison (using the exact same setup, just switching from chromem-go to pgvector - both using the same flow, embedding model and cosine similarity). Only the README.md of knowledge has been ingested. Query:
chromem
Setup: default, no changes needed
{ "id": "eeff81fc-1443-4266-9102-eda0eb532fa1", "content": "# GPTScript Knowledge Tool\n## Supported File Types\n- `.pdf`\n- `.html`\n- `.md`\n- `.txt`\n- `.docx`\n- `.odt`\n- `.rtf`\n- `.csv`\n- `.ipynb`\n- `.json`", "metadata": { "absPath": "/home/thklein/git/github.com/gptscript-ai/knowledge/README.md", "filename": "README.md" }, "similarity_score": 0.8255993 },
pgvector
Setup:
docker compose up
export KNOW_VECTOR_DSN="pgvector://knowledge:knowledge@localhost:5432/knowledge?sslmode=disable"
{ "id": "931916aa-a192-4a5a-b54f-908c68453c65", "content": "# GPTScript Knowledge Tool\n## Supported File Types\n- `.pdf`\n- `.html`\n- `.md`\n- `.txt`\n- `.docx`\n- `.odt`\n- `.rtf`\n- `.csv`\n- `.ipynb`\n- `.json`", "metadata": { "absPath": "/home/thklein/git/github.com/gptscript-ai/knowledge/README.md", "filename": "README.md" }, "similarity_score": 0.8421717 },
Comparison (using the exact same setup, just switching from chromem-go to pgvector - both using the same flow, embedding model and cosine similarity). Only the README.md of knowledge has been ingested. Query:
Top Results
chromem
Setup: default, no changes needed
pgvector
Setup:
pgvector
locally via docker-compose (compose file provided in repo root):docker compose up
export KNOW_VECTOR_DSN="pgvector://knowledge:knowledge@localhost:5432/knowledge?sslmode=disable"