Comments (2)
Hello @amirhagai,
In the code above you run the following fragment 3 times:
vectorstore = Chroma.from_documents(documents=splits, embedding=OpenAIEmbeddings())
That means you add documents to vectorestore 3 times.
I don't know if there is any mechanism which prevent saving of duplicates, but if you want to reset state of your vectorstore please run: vectorstore.delete_collection()
from langchain.
Thanks for the clarification!
It actually appears twice as I mistakenly copy paste the same cell twice :)
But I do see that when I run the cell more than once the DB add items to itself, instead of creating new instance. does it the excepted behavior?
Just to make things clear, each time I run this cell -
from langchain_openai import OpenAIEmbeddings
from langchain_community.vectorstores import Chroma
vectorstore = Chroma.from_documents(documents=splits,
embedding=OpenAIEmbeddings())
Chroma add items. and changes the retrieval even if it's not redefined.
The docs say that the function "Create a Chroma vectorstore from a list of documents."
https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.chroma.Chroma.html
Thanks again :)
from langchain.
Related Issues (20)
- How can we do hybrid search using AzureAISearchRetriever?
- DOC: Broken Link on Chroma Vectorstores Documentation Page HOT 1
- Prompt variables are not replaced for tool calling agents when using SystemMessage class HOT 3
- LangChain Conversation Looping with Itself After Initial Greeting HOT 3
- OpenAIAssistantV2Runnable incorrectly creates threads with tool_resources
- HuggingfacePipeline - ValueError: alternative_import must be a fully qualified module path HOT 4
- model_name in ChatResult from BaseChatOpenAI is not sourced from API response HOT 2
- `load_chain` uses incorrect class when loading `LLMChain` with `HuggingFacePipeline` HOT 7
- Bot3 HOT 4
- HuggingFacePipeline can‘t load model from local repository HOT 1
- LlamaCppEmbeddings gives a TypeError on line 114 saying TypeError: float() argument must be a string or a real number, not 'list' HOT 7
- With langchain v0.2.2 use ChatTongyi(streaming=True) occurred error ' KeyError: 'request' ' HOT 5
- 使用ChatSparkLLM构造的llm,在模型返回ConnectionError后,无法再次invoke
- DOC: <Issue related to /v0.2/docs/integrations/tools/wolfram_alpha/> returned answers are incomplete.
- DOC: ConfluenceLoader docstring refer to wrong class name
- api_controller fails to specify tool in Action, entering infinite loop HOT 3
- openai model always includes the input prompt in its output
- LLMGraphTransformer giveback empty nodes and relationships ( with gpt-4o ) HOT 2
- Incorrect passing of scores for sorting in CrossEncoderReranker HOT 3
- DOC: <Please write a comprehensive title after the 'DOC: ' prefix> HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langchain.