Skip to main content

Overview

Ansa helps documentation teams:
  • Provide instant answers from your docs
  • Reduce support tickets for documented topics
  • Surface relevant articles naturally
  • Identify documentation gaps from user questions
  • Handle questions your docs don’t cover gracefully
Documentation assistant

Knowledge Base Setup

Indexing Your Documentation

Ansa supports multiple ways to index docs:
Source TypeBest For
Web CrawlPublic documentation sites
File UploadPDFs, markdown files, internal docs
Text SourcesCustom content, snippets
Q&A PairsCommon questions with vetted answers
Web sources

Web Crawling Tips

When crawling documentation sites:
  1. Start from the docs root (e.g., docs.yoursite.com)
  2. Set appropriate depth — Most docs need 3-5 levels
  3. Exclude irrelevant paths — Changelog, release notes (unless needed)
  4. Re-sync regularly — Set up scheduled syncs for updated content
Use the auto-detect feature during onboarding. Ansa automatically discovers docs pages at /docs, /documentation, /help, /guides, and /api.

Structuring Content for Best Results

Good documentation indexing: ✅ Clear headings and subheadings ✅ Concise paragraphs ✅ Code examples with context ✅ Descriptive link text Avoid: ❌ Single-page docs with everything ❌ Heavily nested accordions (may not crawl) ❌ Content loaded via JavaScript (use static/SSR)

Agent Configuration

System Prompt for Documentation

You are a helpful documentation assistant for [Product Name].

Your role:
- Answer questions accurately based on the documentation
- Provide code examples when relevant
- Link to relevant documentation pages for further reading
- Be concise but thorough

When you don't know the answer:
- Acknowledge honestly that you couldn't find this in the docs
- Suggest related topics that might help
- Offer to connect them with support if needed

Format responses for readability:
- Use markdown formatting
- Include code blocks with proper syntax highlighting
- Use bullet points for lists

Temperature Settings

Use CaseTemperatureWhy
API Reference0.1 - 0.3Accuracy is critical
Tutorials/Guides0.3 - 0.5Balance of accuracy and explanation
Conceptual Docs0.5 - 0.7More natural explanations

Model Selection

For documentation assistants:
ModelBest For
Claude 3.5 SonnetExcellent at explaining code and concepts
GPT-4oGreat for technical documentation
GPT-4o-miniCost-effective for high-volume sites

Widget Configuration

Suggested Messages

Guide users to common topics: Widget customization Configure suggested messages for quick access:
{
  "suggestedMessages": [
    "How do I get started?",
    "Show me authentication examples",
    "What are the API rate limits?",
    "How do I handle errors?"
  ]
}

Placement

For documentation sites:
PlacementPositionWhen
Bottom RightDefaultGeneral docs sites
Bottom LeftAlternativeIf conflicts with ToC
InlineEmbeddedSpecific help sections

Triggers for Documentation

Engagement on Complex Pages

Help users on lengthy or complex docs:
{
  "name": "Long Page Help",
  "triggerType": "time_on_page",
  "conditions": {
    "timeOnPage": 60,
    "page": "/docs/advanced/*"
  },
  "actionType": "show_bubble",
  "actionConfig": {
    "message": "Need help understanding this? I can explain any part.",
    "duration": 8
  }
}

Search Page Fallback

Engage users who might not find what they need:
{
  "name": "Search Assistance",
  "triggerType": "time_on_page",
  "conditions": {
    "timeOnPage": 30,
    "page": "/docs/search*"
  },
  "actionType": "open_chat",
  "actionConfig": {
    "message": "Can't find what you're looking for? Tell me what you need and I'll help you find it."
  }
}

Handling Unknown Questions

When the agent can’t find an answer in the docs:

1. Honest Acknowledgment

System prompt should include:
When information isn't in the documentation:
- Say "I couldn't find this in our documentation"
- Suggest similar topics that might help
- Offer to connect them with support

2. Fallback Form

Create a form for questions that need human help:
{
  "name": "docs_feedback",
  "description": "Use when you cannot answer the user's question from the documentation.",
  "executionType": "form",
  "formSchema": {
    "fields": [
      {
        "name": "question",
        "label": "Your Question",
        "type": "textarea",
        "defaultValue": "{{context.lastMessage}}"
      },
      {
        "name": "email",
        "label": "Email (for follow-up)",
        "type": "email"
      }
    ],
    "submitLabel": "Submit Question",
    "successMessage": "We'll add this to our docs or get back to you!"
  },
  "formPostActions": [
    {
      "type": "slack",
      "webhookUrl": "https://hooks.slack.com/...",
      "messageTemplate": "📝 *Docs Gap Identified*\n\n{{question}}\n\nFrom: {{email}}"
    }
  ]
}

Identifying Documentation Gaps

Review Low-Confidence Conversations

Use the analytics dashboard to find:
  • Questions with low confidence scores
  • Repeated questions not well-answered
  • Topics users ask about that aren’t documented
Analytics

Create Q&A Pairs

For frequently asked questions not well-covered: Q&A sources
  1. Go to Knowledge Base → Q&A
  2. Add the exact question users ask
  3. Provide the ideal answer
  4. These get high priority in searches

Integration with Doc Platforms

GitBook, Docusaurus, Mintlify

Web crawl your public docs URL. Ensure:
  • Content is server-rendered
  • No robots.txt blocking
  • Sitemap available for best coverage

Notion, Confluence

For internal docs:
  1. Export as PDF or markdown
  2. Upload via file sources
  3. Set up periodic re-uploads for updates

API Reference (OpenAPI)

Upload your OpenAPI/Swagger spec as a file source. The agent will understand:
  • Endpoints and methods
  • Request/response schemas
  • Authentication requirements

See Also