Skip to content

Multi-collection in a RAG system #32876

Discussion options

You must be logged in to vote

Looks like you are using langchain.
The from_documents() is an interface of langchain.VectorStore. It accepts a list of langchian.Document and an embeddings callback function:

def from_documents(
        cls: Type[VST],
        documents: List[Document],
        embedding: Embeddings,
        **kwargs: Any,
    )

Each langchain.Document has two members: page_content and metadata. page_content is a text content of your document, metadata is a dict which contains the extra properties of the document.

class Document(Serializable):
    page_content: str
    metadata: dict = Field(default_factory=dict)

When you first time call the from_documents(), it initializes a Milvus middleware to creat…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@wilsoncastiblanco
Comment options

@wilsoncastiblanco
Comment options

@yhmo
Comment options

Answer selected by wilsoncastiblanco
Comment options

You must be logged in to vote
1 reply
@wilsoncastiblanco
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants