name: buscar_informacao
version: 2
start: buscar_informacao

nodes:
  - id: buscar_informacao
    action: buscar_informacao_rag
    input:
      query: $.input.query
      queries: $.input.queries
      top_k: $.input.top_k
      segment: $.input.segment

  - id: reescrever_resposta
    action: reescrever_resposta_buscar_informacao
    input:
      queries: $.vars.buscar_informacao.queries
      documents: $.vars.buscar_informacao.documents
      answer: $.vars.buscar_informacao.answer
      noMatchRag: $.vars.buscar_informacao.noMatchRag
      ragRetrievedDocuments: $.vars.buscar_informacao.ragRetrievedDocuments
      ragSelectedDocuments: $.vars.buscar_informacao.ragSelectedDocuments

edges:
  - from: buscar_informacao
    to: reescrever_resposta
  - from: reescrever_resposta
    to: END
