Improve your agent
Content gaps (self-improvement)
Pitchbar's self-improvement loop watches every conversation and
flags questions your agent could not answer confidently. Those
questions cluster into content gaps at
/app/analytics/content-gaps. Treat the page as a
prioritised backlog of what to teach your bot next.
How a gap is detected
After every visitor turn,
DetectGapJob queues asynchronously (off the hot
path) with the user message, the agent id, and the confidence
score the retriever produced. The job:
- Normalises the question (lowercase + collapse whitespace) and hashes it.
- Looks up an existing gap with the same hash for this agent;
if found, increments
occurrencesand refresheslast_seen_at. - Otherwise inserts a new row in
content_gapswithstatus=open.
The job is single-attempt โ duplicating a gap row is harmless,
but retrying after a transient DB hiccup would over-inflate
occurrences.
What the UI shows
- Agent picker โ narrow to one bot when you have several.
- Status โ Open (default), Answered (someone added a curated answer / source), Ignored (won't fix).
- Window โ last 7 / 30 / 90 days, or all time.
Each row carries the question text, the count of times it has been asked, the last time it was asked, and the agent it belongs to.
Actions
- Curated answer โ jumps to the curated-answers editor for that agent with the question pre-filled. Once you save the curated answer, the next visitor who asks that question gets a direct response without going through retrieval.
- Resolve โ marks the gap as
answered(the source / curated answer that addresses it is live). - Ignore โ marks
ignored(out of scope for this bot, e.g. visitor asked about a product the workspace doesn't sell).
Who can do what
| Role | View gaps | Resolve / Ignore |
|---|---|---|
| Owner / Admin | Yes | Yes |
| Editor | Yes | Yes |
| Viewer | Yes | No |
Why this matters
Most chatbots silently degrade โ a question never gets answered, the visitor bounces, no one notices. Pitchbar turns those silent failures into a triage queue. Working the gap queue weekly is the fastest path to a high-quality agent.