Skip to main content

🧠 Continual Learning — Teach Your Agent

Turn every mistake into a lesson. The annotation system lets your team flag incorrect agent responses, record what the agent should have said, and build a dataset of corrections that drives ongoing improvement.


🎯 What Is Continual Learning?

Even well-configured agents get things wrong. They might state an outdated fact, respond in the wrong tone, or miss the point entirely. Without a structured way to capture those moments, the same mistakes repeat.

Optimly's Teach Your Agent feature closes that loop. Whenever someone on your team spots a bad response, they can annotate it in seconds — adding the reason it was wrong and the ideal reply. Over time, these annotations become a structured quality record and a dataset for targeted improvements.


🚀 How to Access It

Annotations live inside the Conversations tab of the analytics dashboard.

  1. Open the Conversations tab.
  2. Click any conversation row to open the chat detail drawer.
  3. In the drawer, make sure you're on the Conversation tab (not Metrics or Insights).
  4. Find an assistant message you want to flag.
  5. Click the thumbs-down button that appears on the message.

The annotation modal opens immediately.


✍️ How to Annotate a Response

The annotation modal has two fields:

📋 Reason

Choose the category that best describes what went wrong:

ReasonLabelWhen to use it
wrong_factsWrong factsThe agent stated something factually incorrect — wrong product specs, outdated pricing, inaccurate policy, etc.
wrong_toneWrong toneThe response was technically correct but tonally off — too formal for a casual support context, too casual for a professional one, or otherwise mismatched to your brand voice.
off_topicOff topicThe agent responded to something other than what the user actually asked — a misunderstanding of intent.
incompleteIncompleteThe agent started an answer but left out key information the user needed to proceed.
otherOtherAnything that doesn't fit the categories above — unusual edge cases, formatting issues, or policy violations.

💬 Expected Response

In the text area, write what the agent should have said. Be as specific as possible — this becomes the reference correction for that turn.

Tip: You don't need to write a perfect response. A clear description of what was missing or what the right answer is works just as well.

Once both fields are filled, click Submit to save the annotation.


👀 Where to See Annotations

Annotations are visible in two places after they're submitted.

Info Tab → Annotations Section

Open any conversation and switch to the Info tab in the chat detail drawer. Scroll to the Annotations section.

Here you'll see all annotations recorded for that conversation, each showing:

  • The reason badge (e.g., "Wrong facts", "Incomplete")
  • The expected response text provided by the annotator
  • The annotator who submitted it

This gives team leads a quick quality audit trail per conversation without having to read through every message.

Future: Fine-Tuning Dataset Export

Annotations are structured to be exportable as a fine-tuning dataset. Each record pairs the original agent response with the expected correction — the standard format for supervised fine-tuning workflows. This export feature is on the product roadmap.


📊 What Happens to Annotations

Submitted annotations are stored server-side and linked to the specific conversation turn. They are:

  • Persisted in PostgreSQL — never lost, always retrievable
  • Attributed to the annotator — the system records who flagged each response, based on their login
  • Queryable per turn — your team can retrieve all annotations for any message

This means you can audit annotation history, compare annotators' feedback, and track which agents or topics generate the most corrections.


🔍 Using Annotations to Improve Your Agent

Annotations are most valuable when reviewed systematically. Here's how to turn them into action:

Spot Recurring Patterns

If you consistently see wrong_facts annotations on questions about a specific topic, that's a signal your knowledge base is missing or outdated in that area. Add or update the relevant document.

Identify Tone Mismatches

A cluster of wrong_tone annotations usually points to a prompt configuration issue — the agent's system prompt may not be setting the right communication style. Review and refine your agent's tone instructions.

Fix Knowledge Gaps

incomplete and off_topic annotations often reveal gaps in how the agent interprets intent. Use the expected responses from annotations to improve your knowledge sources or add clarifying examples to the agent prompt.

Track Quality Over Time

After making a change (updating a knowledge source, editing the prompt, switching model), annotate a fresh batch of conversations and compare the rate of new flags. A decreasing annotation rate is a reliable signal that your agent is improving.


✅ Best Practices

Annotate consistently, not exhaustively. You don't need to annotate every wrong response — focus on the ones that matter most to your users or reflect recurring issues.

Be specific in the expected response field. Vague corrections ("just be better") aren't actionable. A concrete example ("The correct price for the Pro plan is $49/month, not $39") gives you something to verify and act on.

Assign annotation responsibilities. Designate one or two people per team to review conversations and annotate regularly. Ad-hoc annotations from everyone can create inconsistencies in reason labeling.

Review annotations weekly. Schedule a short weekly review of new annotations. Group them by reason category and agent to find patterns before they compound.

Use other sparingly. If you find yourself using other frequently, it may be worth proposing a new reason category that better fits your use case. For now, include a clear explanation in the expected response field.

Close the loop. When you fix an issue identified through annotations — whether by updating knowledge, editing a prompt, or changing the model — note it somewhere your team can see. This reinforces the value of the annotation workflow.