We gave terabytes of CI logs to an LLM

(mendral.com)

36 points | by shad42 1 hour ago

9 comments

  • sollewitt 1 hour ago
    But does it work? I’ve used LLMs for log analysis and they have been prone to hallucinate reasons: depending on the logs the distance between cause and effects can be larger than context, usually we’re dealing with multiple failures at once for things to go badly wrong, and plenty of benign issues throw scary sounding errors.
    • aluzzardi 48 minutes ago
      Post author here.

      Yes, it works really well.

      1) The latest models are radically better at this. We noticed a massive improvement in quality starting with Sonnet 4.5

      2) The context issue is real. We solve this by using sub agents that read through logs and return only relevant bits to the parent agent’s context

      • sollewitt 39 minutes ago
        I would be very interested in reading about this kind of orchestration and filtering than data acquisition if you have the energy for another post :)
        • shad42 36 minutes ago
          We started writing very recently: https://www.mendral.com/blog - there is a another post we made yesterday about the overall architecture. And we have a long list of things we're planning to write about in more details.

          Taking good note of your comment :)

        • huflungdung 2 minutes ago
          [dead]
    • shad42 52 minutes ago
      Mendral co-founder here, we built this infra to have our agent detect CI issues like flaky tests and fix them. Observing logs are useful to detect anomalies but we also use those to confirm a fix after the agent opens a PR (we have long coding sessions that verifies a fixe and re-run the CI if needed, all in the same agent loop).

      So yes it works, we have customers in production.

    • verdverm 57 minutes ago
      It can, like all the other tasks, it's not magic and you need to make the job of the agent easier by giving it good instructions, tools, and environments. It's exactly the same thing that makes the life of humans easier too.

      This post is a case study that shows one way to do this for a specific task. We found an RCA to a long-standing problem with our dev boxes this week using Ai. I fed Gemini Deep Research a few logs and our tech stack, it came back with an explanation of the underlying interactions, debugging commands, and the most likely fix. It was spot on, GDR is one of the best debugging tools for problems where you don't have full understanding.

      If you are curious, and perhaps a PSA, the issue was that Docker and Tailscale were competing on IP table updates, and in rare circumstances (one dev, once every few weeks), Docker DNS would get borked. The fix is to ignore Docker managed interfaces in NetworkManager so Tailscale stops trying to do things with them.

      • sollewitt 34 minutes ago
        Thanks - that’s the maddening with flakes - is it the thing under test or the thing doing the testing? Hermeticity is a lie we tell ourselves :)
  • sathish316 50 minutes ago
    SQL is the best exploratory interface for LLMs. But, most of Observability data like Metrics, Logs, Traces we have today are hidden in layers of semantics, custom syntax that’s hard for an agent to translate from explore or debug intent to the actual query language.

    Large scale data like metrics, logs, traces are optimised for storage and access patterns and OLAP/SQL systems may not be the most optimal way to store or retrieve it. This is one of the reasons I’ve been working on a Text2SQL / Intent2SQL engine for Observability data to let an agent explore schema, semantics, syntax of any metrics, logs data. It is open sourced as Codd Text2SQL engine - https://github.com/sathish316/codd_query_engine/

    It is far from done and currently works for Prometheus,Loki,Splunk for few scenarios and is open to OSS contributions. You can find it in action used by Claude Code to debug using Metrics and Logs queries:

    Metric analyzer and Log analyzer skills for Claude code - https://github.com/sathish316/precogs_sre_oncall_skills/tree...

    • testbjjl 23 minutes ago
      > SQL is the best exploratory interface for LLMs

      Any qualifiers here from your experience or documentation?

      • shad42 7 minutes ago
        From own experience it's true, and I think it's due to the amount of SQL content (docs, best practices, code) that you can find online, which is now in all LLM's corpus data.

        Same applies when picking a programming language nowadays.

  • p0w3n3d 15 minutes ago
    That's in the contrary to my experience. Logs contain a lot of noise and unnecessary information, especially Java, hence best is to prepare them before feeding them to LLM. Not speaking about wasted tokens too...
  • whoami4041 51 minutes ago
    "LLMs are good at SQL" is quite the assertion. My experience with LLM generated SQL in OLTP and OLAP platforms has been a mixed bag. IMO analytics/SQL will always be a space that needs a significant weight of human input and judgement in generating. Probably always will be due to the critical business decisions that can be made from the insights.
    • shad42 41 minutes ago
      What we learned while building this is every token matters in the context, we spend lot of time watching logs of agent sessions, changing the tool params, errors returned by tools, agent prompts, etc...

      We noticed for example the importance of letting the model pull from the context, instead of pushing lots of data in the prompt. We have a "complex" error reporting because we have to differentiate between real non-retryable errors and errors that teach the model to retry differently. It changes the model behavior completely.

      Also I agree with "significant weight of human input and judgement", we spent lots of time optimizing the index and thinking about how to organize data so queries perform at scale. Claude wasn't very helpful there.

      • whoami4041 24 minutes ago
        Very interesting work here, no doubt. It's a measured approach to using an LLM with SQL rather than trying to make it responsible for everything end-to-end.
    • dylan604 39 minutes ago
      > IMO analytics/SQL will always be a space that needs a significant weight of human input and judgement in generating.

      Isn't that precisely what is done when prompting?

      • whoami4041 22 minutes ago
        The key to my point is in the word "generating". Meaning human input/judgement by actually typing more SQL than the LLM produces. The model's reasoning and code generation pipelines are typically 2 separate code paths, so it may not always actually do what it intends which can lead to unexpected results.
  • Yizahi 51 minutes ago
    We have an ongoing effort in parsing logs for our autotests to speed up debug. It is vary hard to do, mainly because there is a metric ton of false positives or plain old noise even in the info logs. Tracing the culprit can be also tricky, since an error in container A can be caused by the actual failure in the container B which may in turn depend on something entirely else, including hardware problems.

    Basically a surefire way to train LLM to parse logs and detect real issues almost entirely depends on the readability and precision of logging. And if logging is good enough then humans can do debug faster and more reliable too :) . Unfortunately people reading logs and people coding them are almost not intersecting in practice and so the issue remains.

    • shad42 23 minutes ago
      Yeah it sounds very familiar with what we went through while building this agent. We're focused on CI logs for now because we wanted something that works really well for things like flaky tests, but planning to expand the context to infrastructure logs very soon.
  • kikki 14 minutes ago
    Unrelated; what does "mendral" mean? It's a very... unmemorable word
    • shad42 3 minutes ago
      I am sure you heard before: there are only two hard things in CS: cache invalidation and naming things.

      In the history of this company, I can honestly say that this SQL/LLM thing wasn't the hardest :)

  • dbreunig 1 hour ago
    Check out “Recursive Language Models”, or RLMs.

    I believe this method works well because it turns a long context problem (hard for LLMs) into a coding and reasoning problem (much better!). You’re leveraging the last 18 months of coding RL by changing you scaffold.

    • koakuma-chan 1 hour ago
      This seems really weird to me. Isn't that just using LLMs in a specific way? Why come up with a new name "RLM" instead of saying "LLM"? Nothing changes about the model.
      • vimda 31 minutes ago
        RLMs are a new architecture, but you can mimic an RLM by providing the context through a tool, yes
  • verdverm 1 hour ago
    This is one of those HN posts you share internally in the hopes you can work this into your sprint
  • hal9000xbot 1 hour ago
    [flagged]
    • emp17344 1 hour ago
      I looked through this users comment history. This is pretty obviously a bot.
      • IncreasePosts 1 hour ago
        Well it's right in the name. Sometimes you just have to take it at face value