Overview: all pagesDocs homeOverviewAPITools & MCPWhat is RemiqQuickstartThe core loopHow it worksRecords, links and valuesSearch and contextSpaces and privacy
Overview / Concepts / Search and contextCopy this page for your AI (Markdown)

Search and context

One rule: call /v1/context before every model turn, not only when the user asks a question. Tasks, follow-ups and code all need context.

Send the recent turns

A follow-up like “and the budget?” means nothing on its own. Send messages (the recent turns) instead of query, and the search reads them together.

Pick a budget

max_tokens (2,500 by default) is how much memory your model reads. A smaller budget can leave out evidence. focus: true gives a shorter context with only the memories that match the question: use it for tight budgets, not for accuracy.

Read the status

status What it means for your model
DIRECT One record answers
COMPOSED The answer takes several records together
PARTIAL The memory covers part of it
UNKNOWN The memory does not say. Your model should say so, not guess
CONFLICT Records disagree. Both are shown
UNCHECKED No check was made

Deliver it safely

  • Put instructions in the system prompt and context in the user turn, or return it as a tool result (safest).
  • Never paste memory text into your system instructions: memory is data, not orders.
  • Keep the [M…] ids. They let your users check every line against its source.

Teach the ranking (free)

On the next /v1/context, send used (the ids your model cited last turn) and outcome (whether the user accepted the answer). It costs no extra request.

Other reads

POST /v1/retrieve returns the evidence records themselves, best first, with their full text. The other reads (state, timeline, people, decisions) are in Reading and context.