Skip to content

Optimize Kyma Agent Prompt to Reduce Length and Redundancy #769

@tanweersalah

Description

@tanweersalah

Description:
The current Kyma Agent system prompt is very lengthy, with several repetitive instructions and outdated constraints. Since we are already using the latest LLMs, many of these detailed guardrails and verbose explanations are unnecessary.

Why:

  • The prompt increases token usage unnecessarily.
  • Repetitive and overly explicit instructions reduce readability and maintainability.
  • Modern LLMs are already capable of following implicit reasoning without overly detailed scaffolding.

Proposal:

  • Review the current Kyma Agent prompt for redundancy.
  • Remove unnecessary explanations and constraints that are no longer relevant.
  • Keep only concise, high-level guidance for the agent (e.g., role, scope, and critical rules).
  • Ensure the optimized version is still aligned with the intended functionality and safety requirements.

Acceptance Criteria:

  • Prompt is significantly shorter and easier to maintain.
  • No critical functionality or safeguards are lost.
  • LLM responses remain accurate and aligned with Kyma’s goals.
  • Test the commented testcases in tests/integration/agents/kyma/test_kyma_agent_tool_accuracy.py

This should be handled carefully—removing too much could harm reliability. A before/after comparison of the prompt’s performance would be useful to validate improvements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions