Skip to content

API Reference parrot.flows.thales.models.deck

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.flows.thales.models.deck

View source

Research deck contracts for the "Thales" research flow (FEAT-425).

Every research node (web, deep-research, arxiv, and any future source added by the separate research-tools-for-agents spec) normalizes its output into a :class:Finding list, each carrying one or more :class:SourceClaim citations. Per-angle findings are aggregated into a :class:ResearchDeck.

This module is intentionally dependency-light (pydantic + stdlib only) so satellite specs can build research nodes against :class:SourceClaim / :class:Finding without pulling in any flow machinery.

Class Finding

One extracted finding backed by one or more source claims.

Fields:

Field Type Default Description
text str Extracted paragraph(s) of finding text, capped in length by the caller (see ThalesConfig.max_paragraphs_per_finding).
claims list[SourceClaim] The source claims backing this finding. Every finding must carry at least one claim (enforced by callers, not here).
numeric_series Optional[dict[str, Any]] None Optional chartable numeric data extracted alongside the finding text, when present.

Class ResearchAngle

One research sub-thesis derived from the user's overall thesis.

Fields:

Field Type Default Description
angle_id str Stable identifier for this angle (used to key flow nodes).
title str Short human-readable title for the angle.
question str The specific sub-thesis/question to investigate.
rationale str Why this angle matters to the overall thesis.

Class ResearchDeck

All findings gathered for one research angle.

Fields:

Field Type Default Description
angle ResearchAngle The research angle this deck answers.
findings list[Finding] All findings gathered across enabled research sources.
tools_used list[str] Names of the tools/sources that contributed findings.
groundedness dict[str, Any] Per-source GroundednessReport dumps, keyed by source tool name, recorded for deck provenance.
failed_sources list[str] Names of sources that failed/timed out for this angle (OR-join degrade — the deck is still built from the surviving sources).

Class SourceClaim

One cited source backing a finding.

published_date is intentionally Optional and must never be invented when unknown — downstream bibliography formatting renders missing dates as "n.d." (APA-ish convention) rather than guessing.

Fields:

Field Type Default Description
url str The source URL.
title Optional[str] None Title of the source document/page, when available.
authors list[str] List of author names, when available.
publisher Optional[str] None Publisher/site name, when available.
published_date Optional[str] None ISO date string when discoverable; never invented.
accessed_date str ISO date string of when this source was retrieved.
source_tool str Name of the tool/node that produced this claim, e.g. "web_search", "deep_research", "arxiv_search".
verification Literal['groundedness', 'provider_grounding', 'unverified'] The anti-hallucination verification channel for this claim — "groundedness" (scored via GroundednessGuardrail), "provider_grounding" (accepted for provider-native grounding paths such as Gemini built-in search / Deep Research that yield no ToolCall.result evidence), or "unverified".

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally