Answer
AI-generatedSummary
Answers a question using Valyu AI, optionally returning a structured JSON response.
Inputs
- question (required) — The question to answer
- answerOutputType — Format of the answer response
- answerSchema — JSON Schema for structured answer output
- answerOptions — Options for the AI answer configuration
Output shape
a single JSON object containing the answer and optional metadata (e.g., key points, sources summary)
When answerOutputType is 'structured', the returned object conforms to the provided JSON schema; otherwise it contains a plain text 'answer' field.
Examples
Example 1: Answering a factual question with default settings
question: "What is the impact of AI on healthcare?"; answerOutputType: "text"; answerOptions: default configuration