Knowledge and RAG
Ground your product's AI in your docs, with the sources to prove it
Add PDFs, crawl a website, write snippets and exact Q&A. SentientOne chunks and embeds them, searches by meaning and by keyword on every question, reranks the results and tells your app which sources the answer used.
200 free credits when you sign up. No card needed.
At a glance
Four kinds of source, one search that uses them all
Documents
PDFs up to 50 MB, split into overlapping chunks and embedded.
Learn more about DocumentsWebsites
Crawl a site with page and depth limits and include or exclude paths, up to 200 pages per crawl.
Learn more about WebsitesSnippets and Q&A
Short facts and the exact answers you want for exact questions.
Learn more about Snippets and Q&AHybrid search
Vector and full-text search fused with reciprocal rank fusion (k = 60).
Learn more about Hybrid searchRerank
Cohere rerank-v3.5 orders the 24 best candidates; the top 5 reach the model.
Learn more about RerankCitations
A sources event lists every passage the model was given, with title, URL or file and score.
Learn more about Citations
Sources
Four kinds, added on the agent's Knowledge tab. Each agent has its own knowledge; it switches on as soon as anything is indexed.
| Source | Limits |
|---|---|
| Documents | PDF files up to 50 MB each in the app; PDF and plain-text files through the API. Image-only PDFs have no text and are refused |
| Websites | A start address, max pages (1 to 1,000, default 20) and depth (1 to 10, default 1), include and exclude paths. Each crawl stops at 200 pages. Only the main content of each page is kept |
| Snippets | Short facts, rules or definitions, 3 to 300 characters, stored whole |
| Q&A | A question (3 to 200 characters) and its exact answer (3 to 500) |
Ingestion
What happens between upload and the first answer that uses it.
- Text is extracted from the PDF or the crawled page (crawled pages arrive as markdown; very short and duplicate pages are skipped).
- It is split into 400-word chunks that overlap by 40 words, so a sentence on a boundary is never lost.
- Each chunk is embedded with OpenAI text-embedding-3-small (1536 dimensions), in batches.
- Credits are charged as pages are indexed and refunded for any page that fails.
- Changing an agent's knowledge clears its cached answers and search results, so the next question sees the new content.
The index
Everything lives in Postgres, in one table of chunks, so a single query can do both kinds of search.
| Table | rag_chunks, one row per chunk, each tagged with its agent |
|---|---|
| Vectors | pgvector, 1536 dimensions, HNSW index with cosine distance |
| Full text | A stored tsvector (English) with a GIN index |
| Access | Row-level security on, no public access; only SentientOne's servers query it |
Retrieval
Pure vector search is good at paraphrase and bad at exact strings: SKUs, error codes, names, clause numbers. Keyword search is the opposite. SentientOne runs both and lets a reranker settle it.
01Two searches
The question is embedded and matched with pgvector, and also run as a Postgres full-text query over the GIN index. Each side returns its best matches for the agent.
02Fusion
The two ranked lists are merged with reciprocal rank fusion (k = 60, equal weights), keeping the best 24 candidates.
03Rerank
Cohere rerank-v3.5 scores each candidate against the question. If it doesn't answer within 1.5 seconds the fused order is used.
04Context
The top 5 passages go to the model when the best one scores at least 0.3 (0.5 when the agent also has MCP tools, so it looks things up rather than answer from a weak match).
05Grounding
A fixed instruction tells the model to answer from these passages and not to make things up. The agent can also search again mid-answer with its built-in search_documents tool.
Sources in the stream
Before the answer starts, the stream sends a sources event listing the passages the model was given: title, URL or file name, type, score and a snippet. Show them as citations, or log them.
data: {"type": "sources", "sources": [ {"index": 1, "id": "…", "title": "Returns and refunds", "url": "https://example.com/returns", "filename": null, "source_type": "web", "score": 0.84, "snippet": "Unworn items can be returned within…"}, {"index": 2, "id": "…", "title": "Warranty terms", "url": null, "filename": "warranty-2026.pdf", "source_type": "document", "score": 0.71, "snippet": "…"}]}Ingest by API
Everything the Knowledge tab does is also an endpoint, with your secret key and the agent's id: documents, snippets, Q&A, websites, and deleting a source.
# A PDF or a plain-text file (up to 50 MB)curl https://api.sentientone.ai/v1/ingest/document \ -H "X-Api-Key: $SENTIENTONE_API_KEY" \ -H "X-Agent-Id: $AGENT_ID" \ -F "file=@warranty-2026.pdf"# A website (the API crawls at most 200 pages per crawl)curl https://api.sentientone.ai/v1/ingest/website \ -H "Content-Type: application/json" \ -H "X-Api-Key: $SENTIENTONE_API_KEY" \ -H "X-Agent-Id: $AGENT_ID" \ -d '{"url": "https://help.example.com", "max_pages": 100, "max_depth": 3, "include_paths": ["/docs"]}'Errors use the same envelope as chat: FILE_TOO_LARGE (413), UNSUPPORTED_MEDIA_TYPE (415), EXTRACTION_FAILED (422), OUT_OF_CREDITS (402) and others.
Caching
Retrieval is the slowest part of a grounded reply that you control, so its pieces are cached.
| Query embeddings | 7 days: the same question isn't embedded twice |
|---|---|
| Search results | 5 minutes per agent, dropped when its knowledge changes |
| Answers | The first question of a new conversation, for agents without live tools, is answered from a 15-minute cache. Any knowledge or agent change makes old answers unreachable |
Costs
| A PDF page | 5 credits, once, when it's added (a text file counts as one page) |
|---|---|
| A crawled website page | 5 credits per indexed page, per crawl. A crawl needs at least 5 credits to start and stops adding pages when the balance runs out |
| A snippet or Q&A pair | 1 credit |
| Searching it | Included in the reply's 1 credit |
| Deleting it | Free, and not refunded |
Help centre
Knowledge in the help centre
Step-by-step guides and reference, taken from the product itself. Browse all help
Which file types can I add?
How do I keep a website up to date?
Is my knowledge shared between agents?
What if the reranker is slow or down?
Ground your first agent on your own docs
Sign up and you get 200 free credits, no card needed. Create an agent, add your knowledge, try it in the Playground, then call it from your code or put it on your website.