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 Dashboard Insights
AI Dashboard Insights
Explain what actually changed on a dashboard, in the viewer's own filters and period.
What it does
A short generated commentary attached to a dashboard, describing the movements that matter under the filters currently applied.
How it works
- 1 Compute the numbers first, in the app, using the dashboard's existing queries with the viewer's active filters. Pass the model the computed figures and let it write the wording, never the raw rows to add up itself.
- 2 State the period and the comparison period explicitly in every insight. A sentence saying signups are up is meaningless without saying up against what.
- 3 Filter the input to metrics the viewer is permitted to see before it reaches the model. A commentary that mentions revenue to someone whose dashboard hides revenue is a permissions leak.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/ai-dashboard-insights
Knowledge Source Sync
Knowledge Source Sync
Keep the AI's knowledge current as documents, records, and external sources change.
What it does
An ingestion pipeline that syncs approved sources on a schedule, tracks versions, and removes content whose source disappears.
How it works
- 1 Give an operator an explicit approval step for every source, and default to nothing being indexed. Automatic inclusion of whatever the connected account can see is how private material ends up answerable.
- 2 Store a content fingerprint or version for each document alongside the time of the last successful sync, and re-ingest only what has actually changed since then.
- 3 Reuse the app's existing background-job system and make each sync resumable at the document level, so an interruption partway through a large source restarts from the last completed document rather than from the beginning.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/knowledge-source-sync
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
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.