Vary SIM prose, domain-aware Python hypotheses, per-idea citations + simulated thinking - #38
Merged
Merged
Conversation
…s + thinking The mirrored keyless generators (frontend sim/content.ts, webapp/content.py) emitted fixed-skeleton text: the same self-critique/stress/review stitching every round, identical overview prose every session, and always-biomedical Python hypotheses. This de-templates them and threads simulated reasoning through. De-template (both runtimes, seeded phrase banks, headings/structure unchanged): - makeReview / make_review: 4 dimension paragraphs + assumption note now draw from seeded banks (scores drawn first so they stay deterministic). - makeSelfCritique / make_self_critique: the fixed reread/doubt/stakes stitching sentences now vary per round + target. - makeStressReport / make_stress_report: the break/claim/attack/feasibility/citation sentences vary per hyp + round (verdict token still seeded separately for report<->ranking consistency). - makeOverview / make_overview: every top-level section and per-proposal block drawn from banks, seeded per session (proposal ids) so two runs of the same goal read differently; per-proposal streams keep blocks distinct. Prose genericised so it fits any domain, not just wet-lab. - Match rationales varied (engine.ts, simulator.py, seed.py). Domain-aware Python hypotheses: ported the TS DOMAINS table / keyword extraction / title scaffolds into webapp/content.py so a non-biomedical goal (e.g. a reasoning method) yields on-topic hypotheses instead of drug/pathway mad-libs. make_plan now reports the inferred domain. Enriched both DOMAINS tables (reasoning/LLM terms → computing; inflammation/senescence → biomedicine). Per-idea citations: browser overviewRefs now consumes each proposal's real citations (was re-sampling random curated papers — a bug), deduped like the Python _overview_refs, and markers are spread across the claim / why / experiment sentences. Overview, drawer and per-proposal donut now cite the SAME papers. Framing/summary/landscape/comparative/recommended/open-questions stay UNCITED (Co-Scientist synthesis). Groq-prose path stays honestly uncited. Simulated thinking: each sim hypothesis gets varied seeded reasoning (distinct per hyp), threaded through engine.ts (PlanHyp/hypContent/addHyp/toHypothesis) and the Python store (hyp_thinking side table, read in get_hypothesis). Groq GenHyp gains a real `reasoning` field (prompt + parse) that flows into thinking for BYOK hyps. types.ts Hypothesis + PlanHyp gain optional thinking. Verified: npm run build green; pytest co_scientist/tests/unit -q (276 passed); ruff adds no new errors; server E2E — two same-goal runs differ in prose while headings match, per-proposal [n] resolve to References, framing uncited, hypotheses on-topic, hypotheses carry distinct thinking. Co-Authored-By: Claude Fable 5 <[email protected]>
…e table When this lands alongside the engine-thinking-capture work (which stores thinking as a column on the hypotheses table), get_hypothesis must prefer that column and fall back to the sim's hyp_thinking side table, so both real-engine and simulated reasoning reach the drawer. Co-Authored-By: Claude Fable 5 <[email protected]>
…ation # Conflicts: # frontend/src/types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The keyless SIM generators (
frontend/src/lib/sim/content.ts,webapp/content.py) were fixed-skeleton slot-fill: the self-critique / stress / review stitching sentences were identical every round and session, the entire research-proposal overview prose was byte-identical every session, and the Pythonmake_hypothesiswas always biomedical regardless of goal. Users saw the same text template over and over.What changed
De-template (both runtimes, seeded
r.choice([...])banks; headings + structure unchanged):makeReview/make_review— the four dimension paragraphs + assumption note vary (scores drawn first, so they stay deterministic).makeSelfCritique/make_self_critique— fixed reread/doubt/stakes stitching now varies per round + target.makeStressReport/make_stress_report— break/claim/attack/feasibility/citation sentences vary per hyp + round (verdict token still seeded separately so report ↔ ranking agree).makeOverview/make_overview— every top-level section and per-proposal block drawn from banks, seeded per session (via proposal ids) so two runs of the same goal read differently; per-proposal streams keep blocks distinct. Prose genericised to fit any domain.engine.ts,simulator.py,seed.py.Domain-aware Python hypotheses: ported the TS
DOMAINStable + keyword extraction + title scaffolds intowebapp/content.py, so a non-biomedical goal yields on-topic hypotheses.make_planreports the inferred domain. BothDOMAINStables enriched (reasoning/LLM terms → computing; inflammation/senescence → biomedicine).Per-idea citations: fixed a browser bug where
overviewRefsre-sampled random curated papers instead of each proposal's realcitations(so the overview cited different papers than the drawer/donut). It now consumesp.citations, deduped like the Python_overview_refs, with[n]markers spread across the claim / why / experiment sentences. Overview ↔ drawer ↔ per-proposal donut now cite the same papers. Framing / summary / landscape / comparative / recommended / open-questions stay uncited (Co-Scientist synthesis). The Groq-prose path stays honestly uncited.Simulated thinking: every sim hypothesis gets varied seeded reasoning (distinct per hyp), threaded through
engine.ts(PlanHyp/hypContent/addHyp/toHypothesis) and the Python store (hyp_thinkingside table, read inget_hypothesis). GroqGenHypgains a realreasoningfield (prompt + parse) that becomesthinkingfor BYOK hyps.types.tsHypothesis+PlanHypgain optionalthinking.Verification
npm run build— green.pytest co_scientist/tests/unit -q— 276 passed.# noqa).##headings match; per-proposal[n]resolve to the References list; framing/summary uncited; hypotheses on-topic (not biomedical); each hypothesis carries distinctthinking; self-critique rounds read distinctly.🤖 Generated with Claude Code