Skip to content

[Chore]: Refine Self-Correction Loop to Prevent Prompt Bloating #10

Description

@chiruu12

Description:

Context:
This issue is in response to feedback received on PR #7 regarding our self-correction mechanism:

"The feedback can cause bloating. I don't exactly know how much token each iteration adds, but I feel the original problem gets buried under feedback noise!"

Problem:
The current implementation of our self-correction loop appends the critic's feedback directly to the end of the original prompt for each retry attempt. As noted in the feedback, this approach has two main drawbacks:

  1. Prompt Bloating: It progressively increases the token count with each iteration, leading to higher costs and latency.
  2. Context Dilution: The original, core problem description gets pushed further up in the context window, potentially reducing its significance to the LLM and "burying it under feedback noise."

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions