GUIDES

The knowledge base

Give the agent something to read. Upload your docs once, and every answer is grounded in them.

Upload docs in the console

Open your project, go to Knowledge, and drop files in. EERRAA splits each document into chunks, embeds them, and stores the vectors alongside the raw text. Indexing runs in the background. A doc goes live for retrieval the moment its job finishes, usually a few seconds after upload.

Everything you upload in the console lands in the shared project pool. Every visitor to your widget can be answered from it. Product docs, policies, FAQs, pricing, release notes, put whatever you want the agent to know here.

FieldTypeDescription
Supported typesPDF / TXT / MDText is extracted, then chunked. Scanned image-only PDFs have no text to pull.
File size<= 50 MBPer file. Larger files are rejected with FILE_TOO_LARGE.
Per-user cap20 docsApplies to private per-user uploads (below), not to the shared console pool.
Languagesar / en / mixedEmbeddings are multilingual, so an Arabic question can match English source text and back.

How retrieval works

EERRAA does not just do a vector lookup. Every question runs through hybrid retrieval, so you get the recall of embeddings and the precision of keyword search at the same time.

FieldTypeDescription
Vector searchpgvectorCosine similarity over BAAI/bge-m3 embeddings (1024-d), top-K candidates.
Keyword searchPostgres FTSFull-text search over the same chunks, so exact terms and product names are not missed.
FusionweightedThe two candidate sets are merged with a weighted score into one ranked list.
Rerankcross-encoderA cross-encoder re-scores the merged list against the actual question.
Threshold0.30Chunks below the relevance floor are dropped, so a weak match adds nothing.
Injectedtop 4 chunksThe best four surviving chunks are placed in context before the model answers.

The upshot: when your docs contain the answer, it lands in context. When they do not, nothing crosses the 0.30 floor and the agent answers from the model instead of inventing a citation.

Retrieval is logged. Every turn emits a rag_retrieve event with the chunks it pulled and their scores, so you can see exactly what the agent read before it answered.

Private per-user uploads

Retrieval runs against audiences. The shared project pool answers everyone. A privateuser:<id> pool answers only that one person. That is how you let a customer upload their own contract or spreadsheet and have the agent reason over it, without leaking it to the next visitor.

Private uploads go through the API, not the console, and they require signed identity so the file is bound to a real user you vouched for. Post the file and the signed user_context as multipart form data.

POST/v1/knowledge
bash
curl -X POST https://eerraa.online/v1/knowledge \
  -H "Authorization: Bearer era_your_project_key" \
  -F "file=@contract.pdf" \
  -F 'user_context={"id":"u_123","_ts":1735689600,"_sig":"<hmac>"}'

The call returns immediately while indexing runs in the background:

json
{
  "job_id": "kb_9f2c...",
  "status": "processing",
  "filename": "contract.pdf"
}

List or delete a user's own docs with the same signed identity:

GET/v1/knowledge
DELETE/v1/knowledge
Private uploads need signed identity mode. Without a valid signature the call is rejected with SIGNED_IDENTITY_REQUIRED. Each user gets 20 docs; the 21st returns DOC_CAP_REACHED, and an unsupported file returns UNSUPPORTED_TYPE.