Don't generate solutions. Forge the right problem.
AI can generate hundreds of answers in seconds, which makes solving the wrong problem faster than ever. ProblemForge is a structured problem-solving environment that turns a vague complaint or a premature solution into a testable problem model: it separates known from assumed, challenges the framing adversarially, finds the assumption everything hinges on, and shows, not tells, how the right reframe changes the right answer.
Built for QuantumHacks 2026.
Most people jump straight from problem to solution:
"We need an AI app to help students manage overwhelming coursework."
That sentence already contains an unexamined causal claim (students are bad at managing their work) and a prescribed intervention (an AI app). Neither has been established. Generative AI makes this failure mode worse, not better: ask a chatbot and you get a confident, polished plan for what may be the wrong problem, with the assumptions still invisible.
ProblemForge inserts the missing reasoning: observation → framing → symptoms → competing causes → stakeholders → assumptions → evidence → unknowns → constraints → hinge assumptions → reframing → solution options → stress testing → the smallest measurable experiment.
Feed it the sentence above and watch the recommendation change because the problem understanding changed:
- Premature solution detected, "an AI app" is flagged as a candidate intervention resting on an unverified assumption, before any model call runs (a deterministic pattern layer fires as you type).
- The contrarian attacks the framing: what if the overload is created upstream, by high-stakes deadlines clustering across courses?
- The hinge engine tests the attacked assumption by computation: it re-ranks all solutions under "assumption true" and "assumption false." The winner changes, that is what makes it a hinge, and no model opinion is involved.
- Apply the reframe and the ranking flips on screen: the AI study planner falls from #1 to #4; cross-course deadline coordination rises to #1. Same solutions, same scoring rules, different problem.
- One click turns the winner into the smallest useful experiment, with a metric, a user-defined success threshold (the system never invents benchmarks), and an explicit failure signal that names which rival cause regains priority if it fires.
Provenance is structural. Every element carries a typed status, known, inferred, assumed, unknown, needs_evidence, contradicted, that the engine consumes. "This is an assumption" is a data type here, not a phrase in a paragraph.
The model never emits a number. Reasoning stages produce structure with categorical judgments only (low/medium/high plausibility, weak/moderate/strong cause links). Every score, ranking, movement arrow and readiness figure is computed by deterministic, unit-tested code, and the scoring arithmetic is displayed in the UI ("How are these scores computed?").
The contrarian's objection is load-bearing. It must name the assumption it attacks by id (a hallucinated id is rejected with a 422), and whether the objection matters is decided by the hinge computation, not by rhetoric.
Cross-references are verified. Model output is re-validated with Zod against the same schemas that generated the tool definitions; dangling cause/assumption references are detected and stripped before any arithmetic sees them.
Honesty is a feature. Problem Readiness is a named-criteria checklist (each of its 10 points is a visible, deterministic criterion), never an invented confidence. The seeded demo is labeled "seeded, not live inference" everywhere it appears. Success thresholds are the user's to set.
flowchart TD
U["User with a vague problem or premature solution"]
subgraph EXP["Experience layer, Next.js 16, React 19, Tailwind 4"]
L["Landing"]
W["Workspace: problem map · challenge · reframe flip · experiment · blueprint"]
D["Deterministic instant layer:<br/>premature-solution detector (client-side, no API)"]
end
subgraph API["Application layer, route handlers"]
A1["POST /api/analyze, framer + cause + stakeholder + evidence analyst (one efficient pass)"]
A2["POST /api/challenge, contrarian"]
A3["POST /api/solutions, solution architect"]
A4["POST /api/experiment, experiment designer"]
end
subgraph GUARD["Validation boundary, Zod, shared with tool schemas"]
Z["Schema re-validation + referential integrity check<br/>(dangling ids stripped, hallucinated targets rejected)"]
end
subgraph ENGINE["Deterministic engine, pure TypeScript, fully unit-tested"]
CW["Cause weights: plausibility × provenance"]
SS["Solution scoring with per-cause breakdowns"]
HG["Hinge detection: re-rank under assumption true vs false"]
RF["Reframe comparison: before/after ranking + movements"]
RD["Readiness: 10 named criteria"]
end
SEED[("Seeded demo state, hand-authored,<br/>labeled, schema-validated, flip proven by tests")]
U --> L --> W
W --> D
W --> A1 & A2 & A3 & A4 --> Z --> ENGINE
SEED -.->|no API key / API failure| W
CW --> SS --> HG & RF
ENGINE --> W
The dotted edge is the demo-safety design: with no API key at all, the complete journey runs on the seeded state, clearly labeled, never presented as live inference.
Four structured calls, not seven theatrical agents: the four analyst roles share one efficient extraction pass (they produce one coherent typed object), while the contrarian runs as a genuinely separate adversarial pass over that structure, the architect runs only after challenge, and the experiment designer runs on demand. Every call uses forced tool-choice with a JSON schema generated from the same Zod schema that re-validates the response, one source of truth on both sides of the trust boundary.
| Stage | Input | Output (validated) | Deterministic follow-up |
|---|---|---|---|
| Analyze | sanitised free text | Analysis (symptoms, causes, stakeholders, assumptions, unknowns, constraints, embedded solutions) |
integrity check, dangling-reference stripping |
| Challenge | the Analysis |
Contrarian (target assumption by id, reframe) |
id verified against real assumptions; hinge computed by re-ranking |
| Solutions | Analysis + Contrarian |
SolutionCandidate[] with categorical cause links |
scoring, ranking, before/after comparison |
| Experiment | Analysis + chosen solution |
Experiment |
readiness update |
Next.js 16 (App Router) · React 19 · TypeScript 5 (strict) · Tailwind CSS 4 · Zod 4 (schemas shared between tool definitions and validation) · openai SDK with schema-constrained function calling (forced tool choice) · Vitest (176 offline tests; 22 opt-in live tests). No database, the problem state lives in the client; nothing is persisted or transmitted beyond the four model calls.
npm install
cp .env.example .env.local # optional, see below
npm run dev # http://localhost:3000
npm test # 176 offline tests, zero network calls
npm run build| Variable | Required | Purpose |
|---|---|---|
OPENAI_API_KEY |
No | Enables live analysis of arbitrary problem statements. Without it the complete seeded journey still works and is labeled as seeded. |
OPENAI_MODEL |
No | Defaults to gpt-4.1. |
AI_DIAGNOSTICS |
No | Set to 1 to log per-call diagnostics (latency, tokens, retries). Never logs user problem content. |
LIVE_AI_EVAL |
No | Set to 1 to allow the opt-in live evaluation tests to make real API calls. Ordinary tests, lint, and builds never call the provider. |
The key is read server-side only. It never reaches the browser.
Open /forge → the hero statement is pre-filled → Run the seeded demo → Challenge this framing → Apply the reframe (the ranking flips) → Test this solution on the new winner → Generate the blueprint. With an API key set, Forge this problem runs the same journey on live inference for any statement you type.
The live suite is double-gated: it runs only when LIVE_AI_EVAL=1 and OPENAI_API_KEY are both set, so a key alone can never trigger paid calls from npm test, lint, or a build.
Windows PowerShell, from the project folder (run npm install once; no need to repeat it in the same extracted project):
$env:LIVE_AI_EVAL="1"
$env:AI_DIAGNOSTICS="1"
$env:OPENAI_API_KEY="YOUR_KEY"Then run the cases one at a time, inspecting results between them if you wish:
npx vitest run src/lib/ai/__tests__/live-eval.test.ts -t "d-community"
npx vitest run src/lib/ai/__tests__/live-eval.test.ts -t "e-business"
npx vitest run src/lib/ai/__tests__/live-eval.test.ts -t "f-vague"Each case is one full journey: 4 model calls (analyze, challenge + solutions in parallel, experiment), at most one corrective retry each. Cases a-student, b-startup, and c-workplace run the same way and have already passed.
Output lands in live-eval-results/ at the project root (git-ignored). A success writes <case>.json with the complete journey; a failure writes <case>-FAILED-<stage>.json naming the failed stage, the sanitized rejection reason, and every stage that succeeded before it, so a failure needs no second paid run to diagnose.
The suite (287 offline-passing, plus 22 opt-in live evaluation tests that never run without LIVE_AI_EVAL=1) includes tests that pin the product's honesty, not just its plumbing: the seeded ranking flip is proven (assumption true → planner #1; assumption false → coordination #1), hinge detection is verified against a non-load-bearing assumption (which must NOT flip anything), readiness is checked to be fully attributable to named criteria, schemas are shown to reject numeric-confidence smuggling, and the degraded no-key path is exercised.
ProblemForge is decision support. REASONING_BOUNDARY.md documents the line precisely: every decision-critical claim (evidence status, assumption effects, scores, rankings, commit status, what a test can establish) is computed from typed enum and id fields, and the scoring engine reads no prose at any point; the document also lists, in full, every field where free-form model prose remains.
Known risks and their structural mitigations: hallucinated causes (causal claims default to needs_evidence; schemas reject invented certainty), unsupported cross-references (verified and stripped), fake precision (no model-generated numbers anywhere; readiness is a named checklist), fabricated benchmarks (success thresholds are explicitly the user's), overreliance (the product's own copy repeatedly says "this is an assumption" and "we don't know yet"), prompt injection (input sanitisation plus schema-constrained output, an injected instruction cannot produce anything the engine accepts).
Cause-link strengths and plausibilities are categorical model judgments, the arithmetic on top is deterministic, but the categories inherit model fallibility; the UI keeps them visible and editable-by-rerun rather than hiding them. The hinge analysis explores one assumption flip at a time (no joint scenarios). Single-session state; no persistence or collaboration (deliberately out of scope). English only.
User-editable assumption statuses with live re-ranking · evidence attachment and status promotion (needs_evidence → known) · joint-scenario hinge analysis · saved problems and team review · export integrations.
Siddharth, sole participant.
QuantumHacks 2026 · judged on Innovation 30% · Technical Implementation 30% · Impact 20% · Design & UX 10% · Presentation 10%.