Implement heuristic prompt factorization for parallel execution

t-394·WorkTask·
·
·
·Omni/Agent/Prompt/Compile.hs
Created3 months ago·Updated1 week ago·pipeline runs →

Description

Edit

Add a Factor operation to the free monad (Omni/Agent/Op.hs) that decomposes prompts into parallelizable sub-tasks.

Approach

Use an LLM to analyze a prompt and identify independent sub-tasks that can run in parallel. Not principled Bayesian factorization, but practically useful.

Prior Art

  • ParallelPrompt benchmark (arxiv.org/abs/2506.18728) - measures intra-query parallelism
  • Skeleton-of-Thought - generates outline then fills in parallel

Implementation

1. Add Factor constructor to OpF 2. Implement factorization prompt that identifies independent sub-tasks 3. Return list of sub-prompts that can be passed to existing Par combinator

Metrics & Verification

  • Latency improvement vs sequential execution
  • Output quality preservation (embedding similarity to sequential output)
  • False independence rate (sub-tasks that actually depend on each other)

Test Cases

  • Research tasks: 'Compare X and Y' -> [research X, research Y] -> combine
  • Code tasks: 'Implement A, B, C' -> parallel if independent
  • Analysis tasks: 'Review these 5 files' -> parallel per file

Notes

This is heuristic. True conditional independence detection in NL is a research problem. But even imperfect factorization helps.

Timeline (42)

🔄[system]Open → InProgress2 months ago
💬[system]2 months ago

Pipeline: dev completed (run=dev-t-394-1771489224, cost=0.0c)

🔄[system]InProgress → Verified2 months ago
💬[system]2 months ago

Pipeline: build verification passed

🔄[system]Verified → Open2 months ago
💬[system]2 months ago

Pipeline: integration conflict, resetting for re-dev: Fast-forward of live failed: hint: Diverging branches can't be fast-forwarded, you need to either: hint: hint: git merge --no-ff hint: hint: or: hint: hint: git rebase hint: hint: Disable this message with "git config set advice.diverging false" fatal: Not possible to fast-forward, aborting.

🔄[system]Open → InProgress2 months ago
🔄[human]InProgress → Open2 months ago
💬[human]2 months ago

Pipeline scheduler: failed to spawn agentd run

🔄[system]Open → InProgress2 months ago
🔄[human]InProgress → Open2 months ago
💬[human]2 months ago

Pipeline scheduler: failed to spawn agentd run

🔄[system]Open → InProgress2 months ago
💬[human]2 months ago

Pipeline scheduler: started run=pipeline-omni-agent-prompt-compile-hs-t-394-1771554728 domain=Omni/Agent/Prompt/Compile.hs

🔄[human]InProgress → Open2 months ago
💬[human]2 months ago

Pipeline scheduler reset stale run pipeline-omni-agent-prompt-compile-hs-t-394-1771554728 (agentd reported running but no active container). Returning task to Open for requeue.

🔄[system]Open → InProgress2 months ago
💬[human]2 months ago

Pipeline scheduler: started run=pipeline-omni-agent-prompt-compile-hs-t-394-1771559825 domain=Omni/Agent/Prompt/Compile.hs

🔄[human]InProgress → Review2 months ago
💬[human]2 months ago

Pipeline scheduler: run=pipeline-omni-agent-prompt-compile-hs-t-394-1771559825 domain=Omni/Agent/Prompt/Compile.hs status=failed cost=0c error=OAuth login failed: OAuth login requires an interactive terminal. Please run this command in a terminal session, not in headless mode. (fund-spend=failed)

🔄[human]Review → Open2 months ago
💬[human]2 months ago

Reopened: prior Review transition came from pipeline auth failure, not successful task execution. Re-queued for normal processing.

🔄[system]Open → InProgress2 months ago
💬[human]2 months ago

Pipeline scheduler: started run=pipeline-omni-agent-prompt-compile-hs-t-394-1771560183 domain=Omni/Agent/Prompt/Compile.hs

🔄[human]InProgress → Review2 months ago
💬[human]2 months ago

Pipeline scheduler: run=pipeline-omni-agent-prompt-compile-hs-t-394-1771560183 domain=Omni/Agent/Prompt/Compile.hs status=done cost=25c (fund-spend=failed)

💬[human]1 week ago

Ava triage: pipeline auto-run reached status=done but the agent made NO git commits and reported blockers (missing files, path mismatches, or need clarification). This task is not actually in review — there's nothing to review. Resetting status to Open so it can be re-scoped.

🔄[human]Review → Open1 week ago
🔄[human]Open → Verified1 week ago