• hirihit640@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    4
    ·
    4 hours ago

    some of my work projects have 80k tokens of just documentation

    I feel like there’s got to be better approaches than just shoving the entire documentation into the context. Humans don’t try to memorize the entire documentation. We just search for relevant pieces and remember those, or have them open in a webpage alongside the code. We probably only have like 10k context maximum.

    Do the modern agent harnesses not have automatic compaction?

    • MagicShel@lemmy.zip
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 hours ago

      Yeah so I’ve been working with Claude on that. Typically it greps to find what it’s looking for and that can be a lot of tokens. So I created something halfway between rag and that (semantic search), and overall it lowers token usage a bit, but even if it optimistically reduces tokens 20%, Claude is hungry for docs.

      There is automatic compaction, but I typically want to control that myself when I change focus (if I don’t just /clear it). Still I’d say almost all of the stuff I do runs north of 100k tokens.

      • hirihit640@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        3 hours ago

        Surprised the community hasn’t found better ways to reduce context, 100k is insane. Is it possible to make the agent work on smaller pieces at a time, so less context is needed per piece?

        • MagicShel@lemmy.zip
          link
          fedilink
          English
          arrow-up
          2
          ·
          3 hours ago

          Oh for sure. Agents often use under 30k tokens, but the orchestrator needs to have enough information to instruct the agents so it typically is a fair bit bigger in context. Agents tend to save you money on frontier models, but I’m skeptical about local LLMs. I suppose if you aren’t pressed for time it’s probably just fine. I haven’t played that much with it because anything big enough to bother with agents I typically feel is too big for local anyway. But I’m sure others have experimented more on that front than I have.