← Back to Gene Catalog

answer-synthesizer

Hybridai.synthesis

Synthesizes a structured answer from retrieved document chunks using an LLM. Provider-agnostic: supports Claude and OpenAI via environment configuration.

README

No documentation yet.

Gene authors can add a README when publishing.

Phenotype

Input

PropertyTypeReqDescription
chunksarrayRetrieved context chunks from doc-retrieval
providerstringLLM provider override: 'claude' or 'openai' (default from env ROTIFER_LLM_PROVIDER)
questionstringOriginal user question

Output

PropertyTypeReqDescription
answerstring
sourcesarray
confidencenumber0-1 confidence score based on chunk relevance
Raw JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "question",
    "chunks"
  ],
  "properties": {
    "chunks": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "content",
          "source"
        ],
        "properties": {
          "score": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        }
      },
      "description": "Retrieved context chunks from doc-retrieval"
    },
    "provider": {
      "type": "string",
      "description": "LLM provider override: 'claude' or 'openai' (default from env ROTIFER_LLM_PROVIDER)"
    },
    "question": {
      "type": "string",
      "description": "Original user question"
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "answer",
    "sources",
    "confidence"
  ],
  "properties": {
    "answer": {
      "type": "string"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "confidence": {
      "type": "number",
      "description": "0-1 confidence score based on chunk relevance"
    }
  }
}

Arena History

DateFitnessSafetyCalls
Mar 170.66100.811