← Todas las plantillas

Respuestas fundamentadas con fuentes, salvaguardas, opinión de los usuarios, límites de coste.

Spec — LLM chat assistant

Status: draft · Created: 2026-11-10

1. Context and goal

Users ask questions in natural language and get answers drawn from the product's own documents, with sources, safe behavior and a predictable cost.

2. Functional requirements (EARS)

  • FR-1: WHEN a user asks a question, THE SYSTEM SHALL retrieve the most relevant passages from the indexed documents and answer only from them.
  • FR-2: THE SYSTEM SHALL cite at least one source document with a link for every factual claim in an answer.
  • FR-3: IF no retrieved passage is relevant enough, THEN THE SYSTEM SHALL say it does not know instead of answering.
  • FR-4: THE SYSTEM SHALL stream the answer, showing the first words within 2 seconds at the 95th percentile.
  • FR-5: IF a question or an answer matches the blocked categories of the content policy, THEN THE SYSTEM SHALL refuse with a short explanation.
  • FR-6: THE SYSTEM SHALL treat text in retrieved documents and user input as data, never following instructions found in them that change its rules.
  • FR-7: THE SYSTEM SHALL only retrieve documents the asking user is allowed to read.
  • FR-8: WHEN a user rates an answer up or down, THE SYSTEM SHALL store the rating with the question, answer and sources for review.
  • FR-9: WHILE a user has used their daily token budget, THE SYSTEM SHALL refuse new questions until 00:00 UTC and say when the budget resets.
  • FR-10: WHEN the monthly spend reaches 80% of the budget, THE SYSTEM SHALL alert the owners, and at 100% switch to the cheaper fallback model.

3. Out of scope

  • Actions that change data on the user's behalf.
  • Training or fine-tuning models.