I did the first exercise Build The Intake Agent Exercise and followed all the steps but for some reason both the response and the decision are coming empty and zeroed and the information does not run and neither does the workflow run and I followed all the steps apparently correctly, unless I ate something out of the bag lol, if anyone can give me some light I would appreciate it if anyone has already done this exercise and it worked.
It was solved. I forgot to join the document type to document entity. After doing that it was possible to fill the list correctly and the excercise was conclude.
Thanks for everbody for helping.
Hello @Mayla Queiroz,
You can check the exact error in the Workflow instance within the ODC Portal. If you’d like, you can share it here and I’ll help you troubleshoot it.
Hi Sherif El-Habibi,
I was already taking a look at the logs and saw that the error seemed to be in the index, but since I didn't know much about this part of the workflow, I still didn't know exactly where to look, but now that you've shown me the way, that's exactly it.
I have an output parameter that is exactly the decision that receives this expression, which I believe is where the problem lies:If(Index(AgentFlow.Response, "Approved", startIndex:, searchFromEnd:, ignoreCase:) <> -1, Entities.AgentStatus.Approved, Entities.AgentStatus.Rejected)
I will try to take a guess here and about 30% chance I'm going to be correct. Can you inspect the Documents input in BuildMessages and output in GetGroundingData and make sure they are both of type SimpleDocuments (List). My guess is that they’re currently SimpleDocuments, not List.
Both are SimpleDocuments List.
No worries. Could you take one last step and share a screenshot of the logic inside BuildMessages, showing the inputs of ListAppend1 and ListAppend2, just like in the tutorial steps? The error displayed in the ODC Portal says index out of range which likely means that a record might not have been properly inserted into the list, causing the index issue. That is why I'm focusing on these. Make sure you inserted the inputs correctly and keep me updated.
They are equal yours :( rsrs
That’s kind of strange. The only difference I noticed is the AI model I’m using TrialClaude3_7Sonnet, while you’re using TrialAmazonNovaPro. I’m not sure if that could actually cause the issue, but the tutorial was using Sonnet. Could you try running the same steps again (like copy and paste the same stuff), but this time switch the AI model to TrialClaude3_7Sonnet, and see if it works?
The same error.
No worries, no worries every problem has a solution, right? :D The only option now is to add a breakpoint at the start of CallAgent01_Intake and start a debug, just to pinpoint exactly where the error originates.
I ran the debug and it passes without problems in GroundingData and BuildMessages but when it gets to CallAgent it crashes and goes back to the beginning of the CallAgent01_Intake flow action.
Perfect, now we’ve narrowed the issue a bit, and we can say that we have a scenario here. The problem comes from the CallAgent, which only has the Messages parameter coming from the BuildMessages server action. The Messages output is bound to two ListAppend actions. What I’m suggesting is that you inspect every Assign inside the BuildMessages action to make sure all variables are assigned correctly and nothing has been missed. To make it easier for you, I’ve taken screenshots of every assign so you can compare them. Also, make sure that SystemPrompt and UserPrompt Settings values are correctly configured.
Hi Mayla, maybe there is a problem with your Prompts:
Could you confirm that your "SystemPrompt" is:"You are a meticulous Data Extraction Agent. Your mission is to extract all information from the provided file(s) with absolute precision and completeness. You must act as a data extractor, not a summarizer. Validate that the documents provided match the JSON information for a loan application. Cross-reference all information in the documents provided, and ensure all of it matches the provided JSON information. Your goal is to identify any discrepancies to the JSON loan information. In your response, mention 'Approved' only and only if there is no discrepancy."
And your "UserPrompt" is: "Based on the input below, validate the documents and answer only with 'Approved' if all documents are valid. If the dates are in the future, still consider them as valid. Provide a short summary (under 200 characters) to justify the decision. The end of the response should be 'Approved' or 'Rejected' depending your analysis. Disregard discrepancies in address and in capital letters."
Could you also double click the "CallAgent" action and check what is selected on the AI Model?
Everything is the same as the screens you sent me, nothing different, I don't know why this error is coming and it doesn't work, but when I call CallAgent it stops.
Change here.
I did it but still the same Silvio.
Did you check the order? First assign and then call the service action. Also set the Decision and Response values. I had the same problem and resolved it by leaving this screen the same. If you look at the other activities, it's correct. Only the first exercise was instructed to execute incorrectly.
Could send me a picture of this step please that I can compare with?
It would be here, but I think I misread the exercise instructions. I confused "below" with "before." And set the value in "Response Assign"
@Mayla Queiroz : Please export your Application, Agent & workflow and share the OML. It might be possible that there is something wrong with the code. If everything is good you may raise a support ticket with OutSystems.
Hi Siya, these are my .oml, but anyway I already opened a support case.
Thanks for sharing the file. I am not sure what is happening but ODC Studio is unable to open these oml files ("This file was built with Service Studio and can't be opened in ODC Studio. To reuse elements from this file, copy and paste them into your ODC Studio app or library.") . However I am able to import the workflow and I don't see an issue there.
btw have you received an update from OutSystems support on the case raised ?
Hi,
That is really strange. So far nothing. I'm still wating for them.