| Name | Type | Description |
|---|---|---|
connection_string* | str | A valid MongoDB connection URI. |
database_name* | str | The name of the database to connect to. |
collection_name* | str | The name of the collection to connect to. |
entity_extraction_model* | BaseChatModel | |
entity_prompt | ChatPromptTemplate | Default: prompts.entity_prompt |
query_prompt | ChatPromptTemplate | Default: prompts.query_prompt |
max_depth | int | Default: 3 |
allowed_entity_types | Optional[List[str]] | Default: None |
allowed_relationship_types | Optional[List[str]] | Default: None |
entity_examples | Optional[str] | Default: None |
entity_name_examples | str | Default: '' |
validate | bool | Default: False |
validation_action | str | Default: 'warn' |
Construct a MongoDB KnowLedge Graph for RAG
from a MongoDB connection URI.
LLM for converting documents into Graph of Entities and Relationships.
Prompt to fill graph store with entities following schema.
Prompt extracts entities and relationships as search starting points.
Maximum recursion depth in graph traversal.
If provided, constrains search to these types.
If provided, constrains search to these types.
A string containing any number of additional examples to provide as context for entity extraction.
A string appended to prompts.NAME_EXTRACTION_INSTRUCTIONS containing examples.
If True, entity schema will be validated on every insert or update.
One of {"warn", "error"}.