Skip to content
Directory
GitHub Star
Evidence, tags & source code

Adding Image Generation to an Agent Without Inventing Financial Facts ​

Imagine a personal ETF Agent with a completed report and a desire for covers and shareable cards. If the whole report is sent to an image model, titles, returns and decimal points can be reinterpreted. A pleasing picture is not proof of correct data.

Two delivery paths ​

ElementOwner
Creative background, metaphor, compositionImage model
Exact text, fund name, figures and as-of dateImmutable report and deterministic renderer
Trustworthy chartsDeterministic calculation and chart code
Publication and sharingArtifact storage and access checks

The OpenAI image generation guide discusses limitations in text rendering, composition and consistency. Inspect text-free outputs; send only visual semantics rather than private holdings or full reports.

A synthetic production snapshot:

json
{
  "reportRevision": "demo-v1",
  "visualBrief": "abstract layered paper landscape, no text",
  "locale": "zh-CN",
  "width": 1200,
  "height": 630,
  "imageBudget": 1
}

Internal dimensions are not provider parameters. The adapter selects supported sizes and enforces budgets. Titles and figures come from the report; multiple aspect ratios can reuse a background. Authorize extra cost for genuinely new compositions.

Recover only the failed stage ​

Record generation request, upstream result, retrieval, decoding, composition and publication separately. If the provider has returned a retrievable result, retry failed retrieval before generating again. Reconcile a dispatched request with an uncertain outcome rather than assuming no charge. Restrict download hosts, size and time; check MIME, decoding and dimensions, and keep signed URLs out of public logs.

Use a synthetic provider returning a fixed background to verify that text and charts in different locales and sizes agree with the same report revision. Simulate download failure, late jobs and missing candidates. Qualify actual image quality, unintended text and billing separately. This is a design, not a live image-generation test.

Image generation and deterministic report cards are both Planned in the Open ETF Agent application roadmap. Research, calculation and evidence retain responsibility for financial facts.

Engineering notes, evidence and boundaries. · Contact: hpoenixf@foxmail.com · WeChat: hpoenixf0510