TABLE OF CONTENTS
ADMIN PRIVILEGES REQUIRED
Overview
The Validation Requests API allows you to retrieve answers validated by a subject matter expert (SME). You can then use the results in an internal process to update source content or record a trust signal for the source material.
This guide includes general concepts and two case studies where a back-end system retrieves SME validations and records those trust signals. For a full treatment of the SME validation API, read the Synchronize SME-validated Answers with the API article. You can learn more about the API endpoint in the Validation Requests API reference.
Before you begin
You need an OAuth application that can call the Stack Internal API and has the validation-requests:read permission. For OAuth registration and the complete production-ready connection flow, read The Stack Internal API. For a short-lived test connection, read the Stack Internal API Quick Connect Guide.
To store trust signals from the validation API, your integration also needs permission to update or annotate content in the source system (for example: Google Drive or Stack Internal Community).
How SME validation works
When a user asks a question, Stack Internal generates an answer from available source content. The user can request SME validation when they need an expert to review that answer.
The full process:
- A user asks a question in Stack Internal.
- Stack Internal returns an answer and the source content it used.
- Stack Internal's trust analysis deems the response low-trust and displays a Verify with SME button.
- The user clicks the button to request SME validation.
- Stack Internal sends a validation request to the assigned SME.
- The SME reviews the question, generated answer, and source context.
- If the answer is correct, the SME validates the answer.
- Stack Internal stores the completed validation, including the full answer and its source references.
Retrieve completed validations
When you call GET /v1/validation-requests/search, the endpoint returns source-backed validations for the Stack Internal workspace you're authenticating into.
You can use filters to control the results returned. Use since to retrieve validations completed after a known time. You can also filter by sourceType, sme, or topicName. Use pageSize to set the number of results, and send nextCursor with the same filters until the API returns null.
Each result record includes:
- The validation request, attempt, and event identifiers.
- Status and lifecycle timestamps.
- The question and validated answer.
- The SME who validated the answer and the validation time.
- Source document metadata: source system, title, URL, author, and source date.
Currently, a validated answer's status is sme_verified, and validatedAnswer and suggestedAnswer are the same.
What validation is (and isn't)
To effectively use the validation API response to improve trust in source content, it's important to understand what a validation response indicates–and what it doesn't.
An SME validation confirms the AI-generated answer to a specific question. It does not verify every statement in a source document, or identify the exact section used to create the answer. It's incorrect to say the SME validation process confirmed an entire source document or other source content. Instead, view the validation as applying to the generated answer the source content contributed to.
Trust labels
Careful wording of trust labels will make the validation process clearer for your users.
- Incorrect: "This document was verified by an SME."
- Correct: "This document was used in an SME-validated answer."
Use the validation data in an integration
The data returned by the validation API allows you to identify the source(s) used in the answer by matching each sourceDocuments.url entry to content in the source system. You can then save any combination of the validation identifiers, validation time, SME name, question, validated answer, and source metadata with that relationship. Apply a "Used in an SME-validated answer" (or similar) tag.
The process above is the simplest way to link the validation process with source content. Because the API doesn't return a source section heading, quote, character range, or chunk identifier to identify the actual content used, you'll need to enhance the integration for more granular trust control of larger documents.
The API returns the full AI-generated answer; you may be able to use this to identify specific sections of a larger document used by the AI in a validated response. In that case, you could attach trust signals or tags to only the relevant section of the document. The implementation of a more granular validation tracking system will vary by integration and is beyond the scope of this document and Stack Internal support.
Consider breaking up large documents before ingestion, especially if a document covers multiple topics. This will make it easier to determine what content was used by the AI and validated by an SME.
Use case: Google Docs source
A Stack Internal response uses a Google doc named "Deployment Process" to answer a question. An SME verifies the answer.
Here is one method to capture the trust signal from the SME validation:
- Retrieve the relevant data from the SME validation API endpoint.
- Match the returned
sourceDocuments.urlvalue to the Deployment Process document in Google Drive. - Create or update a trust record for the document that links to the validation record.
- Store the returned question, validated answer, SME name, validation time, and source metadata.
- Show a source-level label such as "Used in an SME-validated answer" with a link to the validation record.
Use case: Stack Internal Community Q&A source
A Stack Internal response uses a Q&A pair from Stack Internal Community. An SME validates the response.
Here is one method to capture the trust signal from the SME validation:
- Retrieve the relevant data from the SME validation API endpoint.
- Match the returned
sourceDocuments.urlvalue to the Stack Internal Community Q&A pair. - Save the validation relationship with the source item and the API identifiers, including the SME and validation time.
- Show that the source item was used in an SME-validated answer. This could be a dedicated tag.
- Keep the validation relationship separate from any content-quality or moderation status for the Stack Internal Community post.
In this use case, the validation confirms the generated answer. As with a source document, validation does not indicate that every part of the Q&A pair is correct or current.
Review validation records
Use the validation request and attempt IDs when you need to troubleshoot, audit, or remove a trust label. If the source changes after validation, retain the prior relationship for audit history and review the updated source before applying any new label.
Get help
Though we can't directly support custom integrations, our support team is still here to help. Reach out to our support team.