Skip to content

Lost in the Middle problem #15

@rossjillian

Description

@rossjillian

The LLM forgets details in the middle of the prompt. Rather than dumping all text into one prompt, do something more intelligent to structure information search or summarize prior information. This weakness has been pointed out in the research: https://arxiv.org/html/2404.02060v1

One possible solution would be to optimize prompt engineering. Another possible solution is a multi-agent system (https://arxiv.org/pdf/2306.03314), in which we have specialized submodels, i.e. a cog.yaml specialist, a predict.py specialist, a debugging specialist, etc. Possible multi-agent frameworks include:

A proposed multi-agent structure is:

  • file agent - reads files, orders by importance, and extracts relevant parts of the cog.yaml agent and predict.py agent
  • cog.yaml agent - generates cog.yaml using extracted files, working examples, and PyPi grounding. Will test by trying to run cog run.
  • predict.pyagent - generates predict.py using extracted files and working examples. Will test by trying to run cog predict.
  • critic agent (optional, costly but could save development time) - reviews generated cog.yaml and predict.py before they're run
  • debugging agent - reviews errors from cog run or cog predict and synthesizes feedback back to its respective agent
  • weights agent

Concerns of using multi-agent systems include getting stuck in loops and the potential for high costs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions