Skip to content

Add structured validation for generated XAUUSD research reports #8

Description

@ziyuwowo

Currently, GoldFXGraph generates XAUUSD research reports through the LangGraph workflow, but the final report quality validation is still limited.

It would be useful to add a structured validation layer before the final report is persisted or returned to the user.

The validation could check:

  • Whether all required report sections are present
  • Whether forecast direction is valid
  • Whether entry price, stop loss, and take profit are logically consistent
  • Whether the confidence score is within a valid range
  • Whether the report contains unsupported or contradictory statements
  • Whether the generated output matches the expected Pydantic schema

Expected behavior:

If validation passes, the report can be persisted normally.

If validation fails, the workflow should either:

  • Retry the report generation step, or
  • Return a structured validation error with clear reasons
  • This would improve the reliability and trustworthiness of the research workflow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions