> ## Documentation Index
> Fetch the complete documentation index at: https://eomer.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate Forecast Intent

> Re-validate a (partially edited) intent against the dataset columns. The deterministic clarify-loop step: the frontend merges the user's
answers into ``intent`` and posts it here to recompute
``missing_required_fields`` / ``clarification_questions`` / ``review_status``
with no model call.



## OpenAPI

````yaml POST /agent/validate
openapi: 3.1.0
info:
  title: eomer.ai Forecasting API
  description: >-
    Production-grade time series forecasting and natural-language forecasting
    agent
  version: 0.1.0
servers: []
security: []
tags:
  - name: forecasting
    description: Time-series forecasting jobs
  - name: agent
    description: >-
      Natural-language forecasting: extract intent from a prompt, profile and
      recommend a model, and auto-submit a forecast.
  - name: tabular
    description: Classification and regression
  - name: fine-tuning
    description: Custom model training
  - name: storage
    description: Cloud dataset storage
  - name: estimates
    description: Cost and runtime estimation
  - name: system
    description: Health checks and model catalog
paths:
  /agent/validate:
    post:
      tags:
        - agent
      summary: Validate Forecast Intent
      description: >-
        Re-validate a (partially edited) intent against the dataset columns. The
        deterministic clarify-loop step: the frontend merges the user's

        answers into ``intent`` and posts it here to recompute

        ``missing_required_fields`` / ``clarification_questions`` /
        ``review_status``

        with no model call.
      operationId: validate_forecast_intent_agent_validate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentValidateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentExtractResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AgentValidateRequest:
      properties:
        intent:
          $ref: '#/components/schemas/ForecastIntent'
          description: Partially-filled intent to revalidate.
        columns:
          items:
            type: string
          type: array
          title: Columns
          description: Real dataset column names to validate against.
        profile:
          anyOf:
            - $ref: '#/components/schemas/SeriesProfile'
            - type: 'null'
          description: Optional profile (drives the horizon cap).
      additionalProperties: false
      type: object
      required:
        - intent
        - columns
      title: AgentValidateRequest
      description: >-
        Request body for ``POST /agent/validate`` — the LLM-free clarify step.
        The frontend merges the user's clarification answers into ``intent`` and

        re-validates against ``columns``; no file upload or model call is
        needed.
    AgentExtractResponse:
      properties:
        intent:
          $ref: '#/components/schemas/ForecastIntent'
          description: Extracted + validated forecasting intent.
        columns:
          items:
            type: string
          type: array
          title: Columns
          description: Real dataset column names (for answer chips).
        covariate_suggestions:
          items:
            $ref: '#/components/schemas/CovariateSuggestion'
          type: array
          title: Covariate Suggestions
          description: >-
            Proactive, runnable covariate suggestions for the described use-case
            — the chat offers them as accept/decline chips.
        profile:
          anyOf:
            - $ref: '#/components/schemas/SeriesProfile'
            - type: 'null'
          description: >-
            Aggregate dataset profile when target/time/entity columns were
            detected.
      additionalProperties: false
      type: object
      required:
        - intent
        - columns
      title: AgentExtractResponse
      description: >-
        Response from ``POST /agent/extract`` and ``POST /agent/validate``.
        Carries the typed business intent plus the real dataset columns (so the

        frontend can render answer chips for clarification questions) and the

        aggregate profile when one could be computed.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ForecastIntent:
      properties:
        business_objective:
          anyOf:
            - type: string
            - type: 'null'
          title: Business Objective
          description: >-
            Why the user wants this forecast (e.g. 'reduce stockouts at branch
            X').
        forecast_target:
          anyOf:
            - type: string
            - type: 'null'
          title: Forecast Target
          description: Column to predict (must exist in the dataset).
        time_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Time Column
          description: Timestamp column (must exist in the dataset).
        granularity:
          anyOf:
            - $ref: '#/components/schemas/Frequency'
            - type: 'null'
          description: Sampling cadence the user wants to forecast at.
        horizon:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Horizon
          description: How many steps ahead to forecast.
        forecast_frequency:
          anyOf:
            - type: string
            - type: 'null'
          title: Forecast Frequency
          description: >-
            Raw pandas frequency alias (e.g. 'D', 'W-SUN'); derived from
            granularity.
        horizon_quantity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Horizon Quantity
          description: Quantity of a relative duration (e.g. 2 for 'two weeks').
        horizon_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Horizon Unit
          description: 'Unit of a relative duration: hour/day/week/month/quarter/year.'
        entity_columns:
          items:
            type: string
          type: array
          title: Entity Columns
          description: Id columns that define a series (e.g. store, sku).
        grouping_dimensions:
          items:
            type: string
          type: array
          title: Grouping Dimensions
          description: Dimensions to forecast across (e.g. branch, product_group).
        filters:
          items:
            $ref: '#/components/schemas/IntentFilter'
          type: array
          title: Filters
          description: Row filters the user described.
        covariates:
          items:
            type: string
          type: array
          title: Covariates
          description: Exogenous columns/sources to use (weather, holidays, price).
        known_future_features:
          items:
            type: string
          type: array
          title: Known Future Features
          description: Covariates whose future values are known (e.g. planned promotions).
        historical_features:
          items:
            type: string
          type: array
          title: Historical Features
          description: Covariates known only up to now.
        evaluation_metric:
          anyOf:
            - $ref: '#/components/schemas/EvalMetric'
            - type: 'null'
          description: Accuracy metric the user cares about.
        backtest_strategy:
          anyOf:
            - $ref: '#/components/schemas/BacktestStrategy'
            - type: 'null'
        confidence_intervals:
          items:
            type: number
          type: array
          title: Confidence Intervals
          description: Requested prediction-interval coverages (e.g. [0.8, 0.95]).
        seasonality:
          items:
            type: integer
          type: array
          title: Seasonality
          description: Seasonal periods (in steps) the user expects.
        anomaly_handling:
          anyOf:
            - $ref: '#/components/schemas/AnomalyHandling'
            - type: 'null'
        missing_data_handling:
          anyOf:
            - $ref: '#/components/schemas/MissingDataHandling'
            - type: 'null'
        user_constraints:
          items:
            type: string
          type: array
          title: User Constraints
          description: >-
            Free-form constraints (e.g. 'must finish under 5 minutes', budget
            caps).
        deployment_target:
          anyOf:
            - $ref: '#/components/schemas/DeploymentTarget'
            - type: 'null'
        review_status:
          $ref: '#/components/schemas/ReviewStatus'
          default: draft
        missing_required_fields:
          items:
            type: string
          type: array
          title: Missing Required Fields
        clarification_questions:
          items:
            $ref: '#/components/schemas/ClarificationQuestion'
          type: array
          title: Clarification Questions
        confidence:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence
          description: >-
            Extraction confidence — low values route to a stronger model / more
            clarify.
          default: 0
      additionalProperties: false
      type: object
      title: ForecastIntent
      description: >-
        Typed business intent extracted from a natural-language request. Every
        field is nullable/defaulted so the agent can fill it incrementally

        across an extraction + clarification loop. The LLM populates the
        business

        fields; the *control-plane* fields (``review_status``,

        ``missing_required_fields``, ``clarification_questions``) are always

        recomputed deterministically by ``agent.extract`` / ``agent.guardrails``
        —

        never trusted from the model.
    SeriesProfile:
      properties:
        total_rows:
          type: integer
          minimum: 0
          title: Total Rows
          description: Total rows across all series.
        num_items:
          type: integer
          minimum: 0
          title: Num Items
          description: Number of distinct item_ids in the panel.
        min_length:
          type: integer
          minimum: 0
          title: Min Length
          description: Length of the shortest series.
        max_length:
          type: integer
          minimum: 0
          title: Max Length
          description: Length of the longest series.
        avg_length:
          type: number
          minimum: 0
          title: Avg Length
          description: Mean series length across all item_ids.
        frequency:
          $ref: '#/components/schemas/Frequency'
          description: Inferred sampling frequency.
        inferred_freq_str:
          anyOf:
            - type: string
            - type: 'null'
          title: Inferred Freq Str
          description: >-
            Raw pandas frequency alias (e.g. 'D', 'h', 'W-SUN'); None if
            unknown.
        missingness_ratio:
          type: number
          maximum: 1
          minimum: 0
          title: Missingness Ratio
          description: Fraction of NaN values in the target column.
        has_negatives:
          type: boolean
          title: Has Negatives
          description: >-
            True if any target value is < 0 (rules out percentage-based
            metrics).
          default: false
        covers_weekends:
          type: boolean
          title: Covers Weekends
          description: >-
            Whether the series includes Saturday/Sunday timestamps. False for
            weekday-only (business-day) series. Used to resolve relative
            horizons from the data's own calendar (e.g. '2 weeks' = 10 daily
            steps when weekends are absent, 14 when present).
          default: true
        value_min:
          anyOf:
            - type: number
            - type: 'null'
          title: Value Min
        value_max:
          anyOf:
            - type: number
            - type: 'null'
          title: Value Max
        candidate_seasonality:
          items:
            type: integer
          type: array
          title: Candidate Seasonality
          description: Detected seasonal periods (in time steps). Empty if none detected.
        suspected_covariates:
          items:
            type: string
          type: array
          title: Suspected Covariates
          description: >-
            Numeric/categorical columns other than ts/id/target that look like
            covariates.
        dataset_size:
          $ref: '#/components/schemas/DatasetSize'
      additionalProperties: false
      type: object
      required:
        - total_rows
        - num_items
        - min_length
        - max_length
        - avg_length
        - frequency
        - missingness_ratio
        - dataset_size
      title: SeriesProfile
      description: >-
        Statistical profile of an uploaded panel of time series. All numbers are
        aggregates over the full panel — no per-row data is

        retained or logged. Privacy constraint #9 in the project plan.
    CovariateSuggestion:
      properties:
        source:
          type: string
          title: Source
          description: Catalogue source id (weather, holidays, ...).
        variables:
          items:
            type: string
          type: array
          title: Variables
          description: Suggested variable ids for the source.
        rationale:
          type: string
          title: Rationale
          description: Why this helps the described use-case.
        requirements:
          additionalProperties: true
          type: object
          title: Requirements
          description: Prefilled requirement values (city, country_code, ...).
      additionalProperties: false
      type: object
      required:
        - source
        - variables
        - rationale
      title: CovariateSuggestion
      description: One proactive suggestion the chat can offer as accept/decline chips.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Frequency:
      type: string
      enum:
        - half_hourly
        - hourly
        - daily
        - weekly
        - monthly
        - quarterly
        - unknown
      title: Frequency
      description: Inferred sampling frequency of a series.
    IntentFilter:
      properties:
        column:
          type: string
          title: Column
          description: Column to filter on (must exist in the dataset).
        op:
          type: string
          title: Op
          description: 'Operator: ==, !=, in, >, <, >=, <=.'
        value:
          type: string
          title: Value
          description: Comparison value as a string; caller coerces.
      additionalProperties: false
      type: object
      required:
        - column
        - op
        - value
      title: IntentFilter
      description: A single row filter the user described (e.g. branch == 'X').
    EvalMetric:
      type: string
      enum:
        - MAPE
        - WAPE
        - MASE
        - SMAPE
      title: EvalMetric
      description: Evaluation metrics surfaced to the user.
    BacktestStrategy:
      type: string
      enum:
        - holdout
        - expanding_window
        - sliding_window
      title: BacktestStrategy
      description: How historical accuracy is evaluated before trusting the forecast.
    AnomalyHandling:
      type: string
      enum:
        - none
        - clip
        - flag
      title: AnomalyHandling
      description: What to do with outliers in the target before forecasting.
    MissingDataHandling:
      type: string
      enum:
        - ffill
        - interpolate
        - zero
        - drop
      title: MissingDataHandling
      description: How gaps in the target are filled before forecasting.
    DeploymentTarget:
      type: string
      enum:
        - one_off
        - scheduled
        - api
      title: DeploymentTarget
      description: How the user intends to consume the forecast.
    ReviewStatus:
      type: string
      enum:
        - draft
        - needs_clarification
        - confirmed
      title: ReviewStatus
      description: Lifecycle of an intent as it moves through the agent state machine.
    ClarificationQuestion:
      properties:
        field:
          type: string
          title: Field
          description: The ForecastIntent field this question resolves.
        question:
          type: string
          title: Question
          description: Plain-English question for the user.
        suggestions:
          items:
            type: string
          type: array
          title: Suggestions
          description: Optional click-to-fill answer chips (e.g. detected column names).
      additionalProperties: false
      type: object
      required:
        - field
        - question
      title: ClarificationQuestion
      description: A single follow-up question the agent surfaces to fill a gap.
    DatasetSize:
      type: string
      enum:
        - tiny
        - small
        - medium
        - large
      title: DatasetSize
      description: Coarse dataset-size category used by the rule-based prior.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````