Retrieval-Augmented Generation
Ground AI answers in the app's own content by retrieving source passages first.
What it adds
A retrieval layer that selects permitted passages from app content and supplies them to the model as cited evidence.
What your agent is told to do
5
What your agent is told to do
5-
1
Decide which content is answerable from and treat everything else as out of scope. A retrieval feature pointed at the whole database returns confident answers about records nobody meant to expose.
-
2
Apply the requesting user's tenant, record, and field permissions during retrieval, before any passage is assembled into a request. Filtering the answer afterwards is too late — the content has already crossed the boundary.
-
3
Chunk on the content's own structure — sections, headings, rows, message boundaries — and carry enough surrounding context in each chunk that it still means something on its own.
-
4
Cite the passages behind every answer with a link back to the source record, and when nothing clears the relevance threshold, say there is no answer in the available sources rather than letting the model fill the gap.
-
5
Keeping the index current — ingesting, versioning, and removing sources — belongs to Knowledge Source Sync. This entry owns query-time retrieval and generation only, and must not build a second ingestion path.
Edge cases it handles
8
Edge cases it handles
8- A chunk that splits a table from its header, a clause from its definition, or an answer from its question is worse than no chunk at all, because it retrieves well and reads wrongly.
- Permission filtering has to happen at retrieval, and it must reflect permissions as they are now, not as they were when the content was indexed.
- Exact identifiers, error codes, and product names are found by keyword matching and missed by meaning-based search, while paraphrased questions are the reverse. Combine both and merge the results rather than picking one.
- Passing more passages than are needed degrades the answer as well as costing more. Cap the assembled context by relevance and by a token ceiling, and drop the tail rather than truncating mid-passage.
- When the evidence is thin or contradictory, the answer must say so and show the conflicting sources instead of silently choosing one.
- Retrieved content is untrusted input and may contain instructions aimed at the model. Handling that is owned by Prompt Injection Defense; this feature must pass retrieved passages through as data and not as instructions.
- When the model is unavailable or times out, degrade to showing the retrieved passages themselves as search results. A grounded feature still has something useful to display without generation.
- A question about content the user cannot see must return the same no-answer response as a question about content that does not exist, or the difference between the two leaks the record's existence.
Definition of done
9
Definition of done
9- Retrieval is filtered by the requesting user's current tenant and record permissions before any passage leaves the application.
- Every generated answer carries citations that link to the source records they came from.
- Insufficient or below-threshold evidence produces an explicit no-answer response rather than an ungrounded one.
- Both keyword and semantic retrieval contribute to the candidate set and their results are merged.
- Assembled context is bounded by a relevance cutoff and a token ceiling, with whole passages dropped rather than cut.
- A model outage degrades the feature to retrieval-only results instead of an error page.
- Ingestion is delegated to Knowledge Source Sync and not duplicated here.
- The feature matches the existing design system.
- No existing functionality is broken.
Related features
AI Insight Cards
AI Insight Cards
Turn a report into a few grounded cards, each tied to a number the app calculated.
What it does
A small set of cards summarising notable movements in a report, each linked to the query and figure that produced it.
How it works
- 1 Detect candidate movements in the app first, using the report's own aggregations. The model ranks and phrases the candidates it is given; it does not go looking for them and it does not produce the arithmetic.
- 2 Bind each card to the query, metric, and period that support it, and make the card link through to the filtered view so a reader can check it in one click.
- 3 Set a materiality threshold before generation, in both relative and absolute terms, so a swing on a metric with three events does not outrank a real change on a metric with thousands.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/ai-insight-cards
AI Trend Analysis
AI Trend Analysis
Explain what a chart is actually showing, in sentences backed by computed numbers.
What it does
A written summary attached to a time series or metric set, describing direction, magnitude, and comparison period.
How it works
- 1 Compute every number in ordinary code before the model is involved: the change, the rate, the comparison period, the baseline, the seasonal adjustment. The model writes prose about figures it is given and must never produce a figure of its own.
- 2 State the comparison window and the time zone in the summary text, resolved from the workspace's configured zone rather than the server's. A change described as week over week is meaningless without saying which weeks.
- 3 Instruct the model to describe what the data shows and to stop there. Do not let it assert causes, attribute movement to campaigns or releases, or predict what happens next.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/ai-trend-analysis
AI Key Point Extraction
AI Key Point Extraction
Reduce long content to the decisions, facts, and requests that actually matter.
What it does
A short list of the salient points in a long document or thread, each tied back to the passage it came from.
How it works
- 1 Apply this where length is the problem: long threads, meeting notes, call transcripts, lengthy tickets, multi-page documents. Content that already fits on a screen does not need extracting.
- 2 Classify each point by kind — decision, fact, risk, request, open question — so a reader can scan for the category they came for instead of reading a flat list.
- 3 Carry a reference to the source passage with every point and let the reader jump to it. A point nobody can verify is a claim, not a summary.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/ai-key-point-extraction
How it works
-
1
Copy the link
Grab the Markdown instruction URL for this feature.
-
2
Give it to your AI
Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.
-
3
It inspects, then implements
Your agent reads your existing app first, then adds the feature to fit it.
Works with your stack
These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.
Need it tighter than that? Customize the feature and tell it exactly what you're running.