3 ms·
My primary use of langchain has been to turn text into a vector database with chroma and then query the vector database to return source materials to an LLM to
by legendofbrando 3y ago
My primary use of langchain has been to turn text into a vector database with chroma and then query the vector database to return source materials to an LLM to use. I’d much prefer to move away from it because like the author I find LC’s adherence to system prompts is really bad. I can handle all of the agent side of things, I just want relevant source materials from the vector DB as strings — anyone have a better more direct way they recommend?
- scriptkiddy 3y agoI've implemented multiple tools that do this and do not use langchain. You just use chroma, the openai sdk and f strings. I can't share the projects because they were implemented for my work and are private.
- zainhoda 3y agoI found Chroma to be really slow. I recently switched to pgvector and I'm really happy with it. This is an example of using pgvector that might be relevant for your use case: SELECT d.id, d.doc, 1 - (embedding <=> (SELECT embedding FROM documentation_embedding WHERE id = 1)) AS similarity FROM documentation_embedding de join documentation d on de.documentation_id = d.id ORDER BY similarity desc;
- jeffchuber 3y agochroma is getting much faster on Monday. be cautious with pgvector - the recall can be extremely bad (% retrieved nearest neighbors vs ground truth)