Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

job chat: the assistant needs to understand data flow, workflows, mappings #163

Open
josephjclark opened this issue Jan 28, 2025 · 0 comments

Comments

@josephjclark
Copy link
Collaborator

In the assistant prompt we don't do a good job of explaining what a step or job is. And I think that's hurting it.

For example, I saw a question today where a user wanted to generate a dhis2 job to insert a datavalueset. The assistant generated a perfectly good create() function, but the snippet sort of asks the user to hand-write their data into it.

here's the question:

write a job for me that creates new datavaluesets under the "Approved School CHP" organization unit

Here's the assistant's code:

create("dataValueSets", {
  orgUnit: "eoYV2p74eVz", // "Approved School CHP"
  dataSet: "DATASET_ID_HERE", // Replace with actual dataSet ID
  period: "PERIOD_HERE", // Replace with actual period, e.g., "202301" for January 2023
  dataValues: [
    {
      dataElement: "DATA_ELEMENT_ID_1",
      value: "VALUE_1"
    },
    {
      dataElement: "DATA_ELEMENT_ID_2",
      value: "VALUE_2"
    }
    // Add more dataValues as needed
  ]
});

But this isn't how workflows work, is it?

What the snippet actually needs to do is read the input - presumably from state.data - and map some values there into the create calll.

Ok, the assistant doesn't know what the incoming data or value sets look like. It hasn't been told. but it can ask, right? Or it can include some kind of stub code. It's not useful two generate example entries like this.

I think the assistant doesn't really "understand":

  1. this is one step in a workflow which transforms data
  2. users are not going to hand-write data
  3. Some data is "fixed", like the org unit, but some comes from state, like dataValues
  4. the role of state at all in this kind of function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant