기술 블로그

← 모든 글

· Research AI

One Pipeline, One ROI Number: How Research AI Scores a Topic

UI는 한국어입니다. 글 본문은 아직 영어 또는 중국어만 있습니다.

After you type a topic, Research AI returns a verdict and a 0–100 Learning ROI score. Both come from the same worker run — not from the browser guessing.

Pipeline (MVP)

research-ai-worker/research_cache_worker/pipeline.py:

  1. Core JSON synthesis — OpenAI structured output: verdict, scores, route (4 steps), takeaways (5), sources (5). Locale-aware (en / zh / ko).
  2. Discussions agent — short list of how people talk about the topic.
  3. Graph agent — nodes you can tap to explore related concepts.
  4. ROI scorer — pure Python on worker sub-scores.

Design doc describes a 7-agent DAG; MVP collapses most work into one JSON call plus two enrichments to control latency and cost.

ROI formula (deterministic)

ROI ∝ (learningValue × backgroundMatch × transfer) / (time × difficulty × decay)

futureRelevance maps to transfer/decay multipliers (Critical … Low). Shorter estimated time and lower difficulty help — but not without cap factors so edge cases do not explode.

The worker writes roiScore into cache. Portfolio ranking reads that field.

Demo mode

No OPENAI_API_KEY? Worker still returns structured demo payloads so Vercel previews and local UI work. Production Fly deploy uses the same code path with real inference.

Further reading: ADR-004 + ADR-007 in xingai-research-ai/docs/adr/