Inspiration
Research rarely happens in one place. We write code in notebooks, draft papers in LaTeX, inspect results in separate tools, request feedback elsewhere, and connect to remote machines when experiments outgrow a laptop. Every transition loses context and makes reproducibility harder.
We built PRE Compose to explore a different idea: what if the paper, code, experiments, evidence, and feedback all lived in one research workspace?
Our goal was not to automate science or manufacture conclusions. It was to help researchers move from an idea to a defensible result while keeping humans in control of every meaningful change.
What it does
PRE Compose is an integrated scientific workspace built around an executable notebook and a live LaTeX paper.
Researchers can:
- Run persistent Python and JavaScript notebook cells.
- Write Markdown and compile real LaTeX PDFs with instant previews.
- Organize independent research projects with their own files, notebooks, and papers.
- Ask an AI assistant questions using the project’s code, outputs, paper, and errors as context.
- Repair LaTeX errors through compilation-verified, reviewable diffs.
- Request structured peer review with comments anchored to exact passages.
- Turn review feedback into experiments instead of treating it as static text.
- Upload a paper and generate an editable replication plan and Python implementation.
- Run replication code locally and compare measured results with the paper’s expected outcomes.
- Define run_trial(params) and evaluate parameter configurations concurrently.
- Export experiments as reproducible SLURM job arrays for larger compute environments.
- Practice defending the work through research-focused questions.
The Iterate workflow treats optimization as a measurable search problem:
$$ \theta^* = \underset{\theta \in \mathcal{S}}{\arg\max}\; m(\theta) $$
where ( \mathcal{S} ) is an explicitly defined set of configurations and ( m(\theta) ) is a metric returned by the actual experiment. PRE records failures and results rather than allowing the AI to invent an “optimal” answer.
How we built it
We built the interface with React, TypeScript, and Vite, using Monaco-based editors for a familiar coding experience. Projects and their files are saved separately, while notebook cells support persistent execution state.
A local Node runtime manages isolated project sessions for Python and JavaScript execution, interactive terminal access, file synchronization, and LaTeX compilation through Tectonic. Matplotlib output is captured and displayed directly inside notebook cells.
We integrated Gemini for structured research assistance, including grounded paper reviews, replication planning, contextual chat, experiment proposals, and minimal LaTeX repairs. AI responses are validated before they reach the interface. Source edits must reference exact existing text, and suggested LaTeX repairs must successfully compile before the user can accept them.
For experimentation, PRE runs each trial in a fresh worker, records numeric metrics, handles timeouts and failures, and selects the best observed result according to the chosen objective. It can also generate the Python runner, configuration file, result contract, and SLURM submission script needed to reproduce the batch on a cluster.
Challenges we faced
The hardest challenge was connecting many different workflows without hiding important boundaries.
Code execution, document compilation, AI generation, and remote computing all fail differently. We needed to preserve useful output when a program crashed, prevent stale AI suggestions from overwriting newer work, stop long-running trials safely, and show compiler errors without disrupting the writing experience.
Grounding the AI was another major challenge. A fluent response is not necessarily a correct one, especially in research. We designed the system around exact quotations, structured outputs, compilation checks, explicit approval, and recorded measurements. PRE presents AI-generated code and edits as proposals, not facts.
Keeping notebook code and the paper synchronized also required careful state management. A researcher should be able to move between Notebook, Paper, Review, Replicate, and Iterate without losing the context that connects an experiment to its written claim.
Finally, reproducibility forced us to think beyond whether code merely “ran.” We needed to preserve the exact source, parameters, outputs, failures, and environment assumptions behind each result.
What we learned
We learned that the most useful research assistant is not the one that produces the most text. It is the one that preserves provenance, exposes uncertainty, and makes its work inspectable.
We also learned that verification can be built directly into the user experience. Compilation checks, exact-source edits, explicit experiment configurations, and recorded metrics are not just backend safeguards: they help researchers understand and trust what happened.
Most importantly, we learned that writing, experimentation, review, replication, and defense are not separate activities. Each one informs the others. Bringing them into a shared workspace makes it easier to turn feedback into evidence and evidence into clearer scientific communication.
What’s next
Next, we want to add stronger environment capture, dataset and artifact provenance, richer statistical comparisons across repeated trials, and deeper SSH/SLURM integration for submitting and monitoring remote jobs directly from Iterate.
Our long-term vision is for PRE Compose to become a transparent research companion that helps people move from question to experiment to paper, without losing the evidence along the way.
Built With
- artificial-intelligence
- elevenlabs
- fastapi
- gemini-api
- hpc
- latex
- monaco-editor
- node.js
- pdf.js
- python
- react
- reproducible-research
- scientific-computing
- slurm
- ssh
- tectonic
- typescript
- vite
- websockets
- xterm.js
Log in or sign up for Devpost to join the conversation.