Skip to content

Send platform (OS) information in prompt

Problem

Now that we are supporting container-less mode for Duo Workflow, we need a way to tell the LLM which platform we are running on (windows/mac/linux) so that the model can generate platform specific commands.

Desired Outcome

Pass OS to the workflow and include it in the prompt so that Workflow can derive which commands to invoke.

Proposed Implementation

  1. Executor fetch current OS information before sending StartWorkflowRequest
  2. Executor include OS information into StartWorkflowRequest adding new entry into AdditionalContext field
  3. Service is going to pick up this new entry at grpc_server.py and pass it into Workflow class via context_elements arguments
  4. Add new optional metafield <os_information> into agents prompts at https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/blob/05693c1a466eca54986bdf216b5480a7f821097f/duo_workflow_service/agents/prompts.py#L205, this new field should be optional and only amended to the prompts when AdditionalContext with OS data is present
Edited by Mikołaj Wawrzyniak