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:

  1. Extracts text — crawls the URL, parses the PDF, or takes your pasted text.
  2. Chunks it into ~600-token pieces with ~100 tokens of overlap, so a sentence split across a boundary is still findable.
  3. Embeds each chunk into a vector.
  4. 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

  1. The visitor's message is embedded with the same model as your content.
  2. The closest chunks are retrieved by cosine similarity.
  3. Weak matches are discarded. If the best match is still too weak, the question is treated as uncovered.
  4. Surviving chunks become context, and the model is instructed to answer only from them.
  5. 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.

ProviderWhenChatEmbeddings
OpenAIBusiness supplied a keygpt-4otext-embedding-3-large (1536-dim)
CloudflareNo key (free tier)llama-3.1-8b-instructbge-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.