NASA-IMPACT / NASA-IMPACT/akd-core

Planner Bug: Assigns wrong value to some node inputs when making the workflow config

Open
#294 0 comments 0 reactions 2 assignees View on GitHub

@muthukumaranR is already working on this.

Since Dec 10, 2025.

Dominant language
Jupyter Notebook
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Started a chat with planner. Below is the chat information along with a generated workflow config

{
  "message": "I'll create a workflow to:\n1. Search for recent studies on environmental justice that utilize AI methodologies.\n2. Analyze the findings to identify key themes and gaps in the research.\n\nWorkflow is ready and will be generated.",
  "ready_to_generate": true,
  "conversation_history": [
    {
      "role": "user",
      "content": "hi"
    },
    {
      "role": "assistant",
      "content": "Hello! How can I assist you with your research today?"
    },
    {
      "role": "user",
      "content": "i want to know what all research has been done in environmental justice with respect to using AI with it"
    },
    {
      "role": "assistant",
      "content": "I can create a workflow to search for research on environmental justice that incorporates AI methodologies. Would you like to focus on recent studies, or is there a specific time frame you have in mind?"
    },
    {
      "role": "user",
      "content": "i want to focus on recent studies"
    },
    {
      "role": "assistant",
      "content": "I'll create a workflow to:\n1. Search for recent studies on environmental justice that utilize AI methodologies.\n2. Analyze the findings to identify key themes and gaps in the research.\n\nWorkflow is ready and will be generated."
    },
    {
      "role": "user",
      "content": "ok do it"
    },
    {
      "role": "assistant",
      "content": "I'll create a workflow to:\n1. Search for recent studies on environmental justice that utilize AI methodologies.\n2. Analyze the findings to identify key themes and gaps in the research.\n\nWorkflow is ready and will be generated."
    },
    {
      "role": "system",
      "content": "Workflow is generated",
      "workflow_id": "d385be16-2f9e-4699-80cf-2291fbcb6012",
      "workflow_created_at": "2025-12-10 17:01:01.599697+00:00"
    }
  ],
  "workflow_config": {
    "workflow_type": "AKDResearchWorkflow",
    "version": "1.0.0",
    "nodes": [
      {
        "type": "deep_search",
        "input": {
          "fields": [
            {
              "query": "recent studies on environmental justice that utilize AI methodologies"
            },
            {
              "search_mode": "recent"
            },
            {
              "additional_context": "Research goal is to explore the intersection of environmental justice and AI in recent research."
            }
          ]
        },
        "output": {
          "fields": []
        },
        "io_map": null
      },
      {
        "type": "gap_analysis",
        "input": {
          "fields": [
            {
              "gap": "gaps in research on environmental justice and AI"
            }
          ]
        },
        "output": {
          "fields": []
        },
        "io_map": {
          "search_results": "$.deep_search.outputs.results"
        }
      }
    ],
    "output": {
      "fields": []
    },
    "edges": [
      {
        "from_node": "START",
        "to_node": "deep_search"
      },
      {
        "from_node": "deep_search",
        "to_node": "gap_analysis"
      },
      {
        "from_node": "gap_analysis",
        "to_node": "END"
      }
    ]
  },
  "chat_id": "d18c209d-312e-4d0c-8026-7c75b2e8d6b8",
  "last_workflow_id": "d385be16-2f9e-4699-80cf-2291fbcb6012",
  "user_id": "e980d3f6-f833-47a5-9951-0a2055af36c9"
}

the planner output a json that has search_mode: recent but it can only be fast,medium or long

Steps to reproduce the behavior
  1. Goto http://akdbac-apise-ulverh4gaexc-980808868.us-east-1.elb.amazonaws.com/api/v1/docs#/chats/upsert_chat_api_v1_chats__post
  2. Try to recreate the conversation looking at the conversation history above
  3. Observe the workflow config given by planner
Expected Behavior

Should have assigned search_mode to allowed values

Relevant log output

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.