ImplementedEngine moduleContent quality / Brand fit / Runtime reliability

Image Selection Module

Pipeline that retrieves, validates, scores, and ranks candidate images per slot using strict contracts and budget caps.

Primary job

Select slot-fit, policy-safe, reachable images with deterministic reporting.

What This Module Does

  • Builds intent and query plans from slot request + context.
  • Retrieves candidates, validates reachability, and filters non-fit assets.
  • Scores candidates with structured outputs against a strict scorecard schema.
  • Produces run-level reports with accepted/rejected candidates and audit events.

Parameters

6 inputs

Inputs that define scope, intent, constraints, and runtime behavior.

slotType

Requiredstring

Slot preset selector (for example article_hero or article_inline).

Source: src/image_module/types.ts

targetCount

Optionalnumber

Desired accepted image count (defaults to 1).

Source: src/image_module/types.ts

slotOverrides

Optionalpartial<SlotPreset>

Per-run overrides for slot constraints.

Source: src/image_module/types.ts

context

Optionalobject

Optional context: title, summary, keywords, brand, audience, purpose, intentFocus, styleHints, requiredTerms, avoidTerms, mustInclude, notes.

Source: src/image_module/types.ts

budgets

Optionalobject

Optional caps: maxIterations, maxSearchCalls, maxCandidates, maxCandidatesPerIter, maxReachabilityChecks, maxModelCalls, maxModelEvalsPerIter, maxSeconds.

Source: src/image_module/types.ts

dryRun

Optionalboolean

Run pipeline without full external side effects.

Source: src/image_module/types.ts

Buttons (Actions)

3 actions

Discrete actions that trigger module behavior.

Run image pipeline

Implemented

Executes retrieval, filtering, scoring, and ranking loop.

Source: docs/pipeline-contract.md

Run dry mode

Implemented

Executes with dryRun flag for safer evaluation.

Source: src/image_module/types.ts

Export run report

Implemented

Outputs RunReport with iteration logs and totals.

Source: docs/pipeline-contract.md

Levers (Settings and Policies)

6 levers

Persistent controls that tune quality, risk, and throughput.

Slot preset

ImplementedSelect

Selects geometry + policy profile for the requested slot.

  • ig_carousel_background
  • article_hero
  • article_inline

Source: src/image_module/repo_profile.json

Budget caps

ImplementedNumeric limits

Prevents runaway retrieval/model usage at runtime.

Default: repo_profile budget defaults

Source: src/image_module/repo_profile.json

Reachability timeouts

ImplementedNumeric limits

Controls HEAD/GET timeouts, redirect cap, and read-size limits.

Source: src/image_module/repo_profile.json

Score thresholds

ImplementedNumeric limits

Minimum acceptance scores and max risk thresholds.

Default: minOverall 70, maxRisk 30

Source: src/image_module/repo_profile.json

Domain policy lists

ImplementedAllowlist/Denylist

Optional domain inclusion/exclusion policy for candidate sources.

Source: src/image_module/repo_profile.json

Model selector

ImplementedConfig

Scorecard model used for structured scoring.

Default: gpt-5-nano

Source: src/image_module/repo_profile.json

Outputs And Telemetry

Outputs

  • Accepted/rejected candidate sets
  • Iteration logs
  • RunReport audit output

Telemetry

  • Model fallback events
  • Dedupe events
  • Reachability outcomes

Outcome focus

  • Content quality
  • Brand fit
  • Runtime reliability

Dependencies And Guardrails

Dependencies

  • Google image retrieval inputs
  • OpenAI API access
  • Repo profile budgets

Guardrails

  • All contracts validated with Zod schemas.
  • Scorecard schema mismatch is treated as failure.
  • Reachability failures are classified with explicit error codes.

Sources Of Truth

Every claim on this page is tied to one or more repo source files.

docs/pipeline-contract.md
src/image_module/types.ts
src/image_module/repo_profile.json
Back to modules
Image Selection Module | Bouncebeam Documentation