Certified Answers

The Certified Answers pipeline retrieves verbatim answers directly from trusted, enterprise-authored content such as FAQs, policies, or procedures.


How It Works

  1. Article Filtering
    • Articles that are used by the Certified Answers pipeline need to be of the articleType 'FAQ'.
    • This ensures only relevant articles are considered in Certified Answer processing.
  2. Semantic Search
    • A semantic search is performed over Title and Related Questions metadata fields of the filtered articles.
    • During indexing or reindexing, embeddings are generated only for these fields and for the 'FAQ' articleType .
  3. Relevance Scoring
    • The user query is embedded and compared against article embeddings using cosine similarity .
    • The article with the highest similarity score is selected as the most relevant.
  4. Answer Extraction
    • The top-matching article content is returned as the Certified Answer .
    • Each result includes a confidence (relevance) score.
  5. Threshold Check
    • If the Certified Answer’s confidence score falls below the configured threshold, the system automatically routes the query to the Generative Answer flow for further processing.

Key Characteristics

  • Precision-Oriented : Extracts directly from enterprise-authored knowledge content.
  • Transparent : Returns source references alongside the Certified snippet.
  • Fallback Ready : Hands off to generative flow if Certified confidence is low.

Why Certified Answers Matter

  • Provide verbatim, source-verified content directly from trusted enterprise knowledge.
  • Ensure traceability and compliance for regulated industries such as finance, healthcare, and legal.
  • Ideal for structured knowledge bases or FAQs where content is concise, accurate, and well-authored.

Example Request

Copy
Copied
curl -X POST "https://api.example.com/core/aiservices/v4/PROD-1000/answers?q=mortgage%20requirements" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json"

Example Response

When a Certified Answer is given, the answerType inside the answer object will be 'certified'.

Copy
Copied
{
  "answer": {
    "answerValue": "To apply for a mortgage, you need proof of income, credit history, and identification documents.",
    "answerType": "certified",
    "relevanceScore": 0.99,
    "references": [
      {
        "id": "PROD-11223",
        "name": "Mortgage Application Guide",
        "source": "eGain Article",
        "docType": "HTML"
      }
    ]
  },
  "searchResults": [
    {
      "id": "PROD-11223",
      "name": "Mortgage Application Guide",
      "docType": "HTML",
      "source": "eGain Article",
      "snippet": "To apply for a mortgage, you need proof of income, credit history, and identification documents.",
      "relevanceScore": 0.99
    }
  ],
  "channel": {
   "type": "portal",
   "name": "customer-web"
   },
  "sessionId": "123456",
  "eventId": "78910"
}