insert()
Insert text content into the knowledge base. Vrin chunks the text, extracts facts (entities + relationships), and indexes everything for retrieval.insert() waits for processing to complete. Pass wait=False to get a job ID and poll later.
Parameters
If
True, poll until processing completes and return the result dict.
If False, return the job ID string immediately.Synchronous (default)
Asynchronous
get_job_status()
Check the status of an async insertion job.Parameters
Returns
pending -> chunking -> extracting -> storing -> completed.
wait_for_job()
Poll a job until completion or timeout. Logs progress as the job moves through stages.Parameters
Exceptions
JobFailedError— The job failed during processing.TimeoutError— The job did not complete withinmax_waitseconds. Useget_job_status()to check current state.
get_knowledge_graph()
Get knowledge graph visualization data showing entities and their relationships.Parameters
What happens during insertion
When you callinsert(), Vrin:
- Chunks the text into overlapping segments optimized for retrieval
- Extracts facts — entities, relationships, and attributes using an LLM
- Stores facts in the knowledge graph (Neptune) with
{model, timestamp, confidence}metadata - Indexes chunks in the vector store (OpenSearch) with BM25 + kNN embeddings
- Returns a summary with fact counts and chunk IDs