{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Generative Answers"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"generative-answers","__idx":0},"children":["Generative Answers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Generative Answers"]}," pipeline produces high-quality, conversational responses when a Certifed Answer is not found. It ensures users receive meaningful answers while maintaining relevance, traceability, and confidence safeguards."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Generative Flow"]}," is triggered if the Certified Answer does not meet the configured ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["generativeAnswerThreshold"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Using Hybrid Search and Re-Ranking, the pipeline selects the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["most relevant content chunks"]}," from the knowledge base."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["These chunks, along with query context, are passed to the LLM for answer generation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If the Generative Answer meets the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["confidence threshold"]},", it is returned to the user. Otherwise, a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["fallback message"]}," is displayed."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-it-works","__idx":2},"children":["How it Works"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Retrieve Relevant Content"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The system searches across enterprise knowledge sources using the submitted query to identify the most relevant content chunks."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Rank Results"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Retrieved results are re-ranked to ensure the most relevant information is prioritized."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Generate an Answer"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The top results, along with the query, are sent to the LLM."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The LLM generates a natural language answer."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Validate the Answer"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The answer is checked against a confidence threshold."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If it passes, the generative answer is returned."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If not, a fallback message is provided."]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-request","__idx":3},"children":["Example Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"curl","header":{"controls":{"copy":{}}},"source":"curl -X POST \\\n  'https://<API_DOMAIN>/core/aiservices/v4/PROD-1000/answers?q=mortgage%20rates' \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer <ACCESS_TOKEN>\"\n","lang":"curl"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-generative-response","__idx":4},"children":["Example Generative Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When a generative answer is given the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["answer"]}," object will have the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["answerType"]}," as 'generative'. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["references"]}," array is a list of source content that the LLM used to generate the answer shown in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["answerValue"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"answer\": {\n    \"answerValue\": \"The current mortgage rate is 6.2% for fixed 30-year loans.\",\n    \"references\": [\n      {\n        \"id\": \"PROD-98765\",\n        \"name\": \"Mortgage Rate Guide\",\n        \"source\": \"eGain Article\",\n        \"docType\": \"HTML\"\n      }\n    ],\n    \"topicBreadcrumb\": [\n        {\n          \"topicSummary\": [\n            {\n              \"id\": \"PROD-5268\",\n              \"name\": \"Mortgages\"\n            }\n          ]\n        }\n      ]\n    },\n    \"answerType\": \"generative\",\n    \"relevanceScore\": 0.92,\n  },\n  \"searchResults\": [\n    {\n      \"id\": \"PROD-98765\",\n      \"name\": \"Mortgage Rate Guide\",\n      \"docType\": \"HTML\",\n      \"source\": \"eGain Article\",\n      \"snippet\": \"As of today, the fixed 30-year mortgage rate is 6.2%.\",\n      \"snippetType\": \"chunks\",\n      \"relevanceScore\": 0.92,\n      \"topicBreadcrumb\": [\n        {\n          \"topicSummary\": [\n            {\n              \"id\": \"PROD-5268\",\n              \"name\": \"Mortgages\"\n            }\n          ]\n        }\n      ]\n    }\n  ],\n  \"sessionId\": \"eb24df84-50d7-4321-b699-d9b03bbe5696\"\n}\n","lang":"json"},"children":[]}]},"headings":[{"value":"Generative Answers","id":"generative-answers","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"How it Works","id":"how-it-works","depth":2},{"value":"Example Request","id":"example-request","depth":2},{"value":"Example Generative Response","id":"example-generative-response","depth":2}],"frontmatter":{"seo":{"title":"Generative Answers"}},"lastModified":"2025-12-18T22:17:28.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/developer-portal/guides/answer/answers_generative","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}