How it works
Minaya is a retrieval-augmented system. Nothing is fine-tuned and no model is trained on your data — your content is stored, indexed, and searched at question time.
Ingestion
When you add a source, a background job:
- Extracts text — crawls the URL, parses the PDF, or takes your pasted text.
- Chunks it into ~600-token pieces with ~100 tokens of overlap, so a sentence split across a boundary is still findable.
- Embeds each chunk into a vector.
- Stores the chunks and vectors in Postgres via pgvector.
Ingestion runs in a separate worker process from the API. If sources never leave
pending, that worker is not running.
Answering a question
- The visitor's message is embedded with the same model as your content.
- The closest chunks are retrieved by cosine similarity.
- Weak matches are discarded. If the best match is still too weak, the question is treated as uncovered.
- Surviving chunks become context, and the model is instructed to answer only from them.
- If MCP servers are connected, the model may call a tool before answering.
Embedding and chat providers
Which provider runs depends on whether the business supplied its own OpenAI key.
| Provider | When | Chat | Embeddings |
|---|---|---|---|
| OpenAI | Business supplied a key | gpt-4o | text-embedding-3-large (1536-dim) |
| Cloudflare | No key (free tier) | llama-3.1-8b-instruct | bge-base-en-v1.5 (768-dim) |
The two produce different-sized vectors, so they are stored in separate columns and never compared against each other.
Adding or removing a key changes which column is searched. Content ingested on the free tier is not automatically re-embedded, so re-add or re-crawl your sources after switching.
Session limits
- 50 messages per chat session.
- 10 MCP tool calls per session, counted separately.
- 2,000 characters per visitor message (the widget caps input at 500).
Free-tier businesses also have a daily message cap. See Security for the rest of the guardrails.