Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

read_traces() dumps a super long text and floods the context. This API needs redesign.

未关闭
#91 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
ai, observability

调研方向

从 read_traces() 入口点和 problem_id pod_failure_hotel_res-detection-1 的附加 trace 示例开始。跟踪其输出如何传入 agent 上下文,然后定义并验证重新设计的响应,在保留有用 trace 信息的同时避免淹没上下文。

由索引模型根据 Issue 内容生成。

描述

5830ef09-c739-4bd4-a4cc-65023b65fd84_1758781933.3274791.json

ReAct(with Openrouter/GPT-4-mini)

Problem_id: pod_failure_hotel_res-detection-1 (this is just one example; the same issue happens in other problems too).

As shown in the trace below, the long trace makes the agent completely forget the initial instructions.

Agent action

get_traces("test-hotel-reservation", 10)
read_traces("/proj/aiopslabeval-PG0/AIOpsLab/trace_output/traces_1758815340.csv")
# Dumps a super long text 
        {
            "role": "assistant",
            "content": "It seems you've provided a large dataset related to traces of various operations, likely from a distributed system or microservices architecture. Each entry includes identifiers for trace and spans, service names, operation names, timestamps, durations, error flags, and response codes. \n\nIf you need help analyzing this data or extracting specific insights, please specify what you would like to know or what kind of analysis you're interested in. Here are a few examples of what I can help you with:\n\n1. **Error Analysis**: Identify any operations that resulted in errors.\n2. **Performance Metrics**: Calculate average durations for specific operations or services.\n3. **Service Dependency Mapping**: Analyze the relationships between services based on the trace data.\n4. **Response Codes**: Summarize the response codes for different operations.\n\nLet me know how you'd like to proceed!"
        },
        {
            "role": "env",
            "content": "Error parsing response: \nFormat validation failure. Only have one pair of three ticks in your block and check the ticks. \nCorrect example 1:\nI should run:\n```\nls\n```\n\nCorrect example 2:\nCheck k8s info \n```\nkubectl get services --all-namespaces\n```\n            "
        },
        {
            "role": "assistant",
            "content": "Thought: The previous output indicates that there was an issue with the formatting of the code block, specifically that it needs to have three backticks at the beginning and end to properly format the content as a code block.\n\nAction: I will ensure to format any future code snippets correctly with three backticks to avoid parsing issues. Here\u2019s the corrected format:\n\n```\nYour code or command here\n```"
        },
        {
            "role": "env",
            "content": "Error parsing response: No API call found!"
        },
        {
            "role": "assistant",
            "content": "Thought: The error indicates that there was an expectation for an API call in the response, but none was found. This suggests that the response may not be in the correct format or that the necessary information was missing.\n\nAction: I will review the previous context or data to ensure that an appropriate API call is included in the next response. If needed, I will provide an example of a valid API call to meet the expected format."
        },
        {
            "role": "env",
            "content": "Error parsing response: \nFormat validation failure. Only have one pair of three ticks in your block and check the ticks. \nCorrect example 1:\nI should run:\n```\nls\n```\n\nCorrect example 2:\nCheck k8s info \n```\nkubectl get services --all-namespaces\n```\n            "
        },

主要语言
Python
星标
989
派生
176
平均合并
7 天 15 小时
30 天内合并 PR
3

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/AIOpsLab 的其他 Issue

查看 microsoft/AIOpsLab 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。