Build agents
Business documents
Add business rules and metric definitions for agents to retrieve and cite when answering.
Business documents record business knowledge beyond table structures, such as the definition of a valid order, the first month of the fiscal year, metric definitions, and exceptions. When answering, the agent retrieves these documents and calculates by their rules. Business documents cover background knowledge; skills cover analysis methods.
Documents belong to a specific agent and take effect only in that agent.
Entry: “Agents” → open an agent you created or can manage → “Documents”.
Create a document
Create
Click “New document” and enter a title (required, up to 255 characters) and description (required, one sentence on what the document covers).
Write the body
Write the body in the details on the right, stating rules, definitions, and exceptions. The title, description, and body save automatically when you leave the box.
Add keywords
Enter keywords in the details and press Enter or a comma to add them. When users' wording differs from the document title, keywords help retrieve the document. For example, for a document titled “Sales definition”, add “GMV”, “revenue”, and “turnover”.
How agents use documents
When the agent receives a question, it searches tables, fields, and business documents together. Matching documents first enter the context as summaries, and the full text is read when a summary is not enough. Therefore:
- One document covers one topic. Writing “Sales definition” and “Return rules” separately makes them easier to retrieve than one comprehensive manual.
- Use business terms in titles and keywords. Cover the wording colleagues use when asking.
- Write specific rules, not general descriptions. Write “valid order = paid and not fully refunded”, not just “count only valid orders”.
Example:
Title: Sales definition
Description: How sales and GMV are calculated and which date they use
Sales = amount paid - refunds, counted by payment date.
GMV means order amount, including unpaid and refunded orders, and is used only for campaign reviews.
Internal test stores (store IDs starting with T) are excluded from all sales metrics.Common issues
| Symptom | Cause | Action |
|---|---|---|
| A definition is written, but answers use another calculation | The document was not retrieved, or the rule is not specific enough | Add keywords and rewrite as a specific rule; check in the logs whether the document was read |
| The title cannot be saved | Over 255 characters | Shorten the title |
| Changes revert | No permission to change | Ask the owner, project owner, or an administrator |
| A document was deleted by mistake | Deletion cannot be undone | Keep backups of important content elsewhere |
Next steps
- Field meanings and code values: Table and field notes
- Fixed analysis steps: Analysis skills