How To Write Prompt In AI Agent

Hello everyone, I want to make the chat is like have a interaction with the user. So the ai agent will start to ask the what is the problem, then the user will answer it. After that the ai agent will ask the second question after user have answer before question. The second question which is where does it happen, and the user continue answer it.

Have anyone can help me to create a draft for the AI Agent Prompt?

Whenever you dont know, you can always ask Claude AI to improve your prompt. Try the below and see if this helps. Pro tip, the more in detail your prompt, the better result you’ll get. You can tweak this prompt further to dial it in a bit to your requirement.

1 Like

Alright, I will try this method. Thanks

If it works, please send feedback and mark my answer as the solution

Now I have faced another issue which is I want after the user have answer that question. It will store to the google sheets automatically. I have using the append row for the google sheets. For the Nature of the problem, Location of the problem, Time of occurrence, Parties involved or affected, and Impact of the problem that user have answered and should be summarize as a sentence and put into the Issue NCR column in the google sheets

Just now I have tried it and some output like company name, issue to, issue by that user have answered did not appear on the summarize table. Have anyone can help me to improve my prompt.

You need to use the sheet as a tool. Lemme get you an example

Try the following. I didnt test it myself but it should work. Let me know if it doesnt, then I’ll connect a google account to my instance

Take NOTE that I updated the prompt to include the tools description. This is key for the agent to know when to call the tool. It’ll know how to fill it in. If you want to use specific columns, let me know and I can update the example. Currently it is set to just fill the columns as it wishes

So now my google sheets will be have Issue NCR, Issue by, Issue to, and Company column

For the answer company name, issue to, and issue by will go to their corresponding column in the google sheets. And the Issue NCR column will be include the answer for problem, location, time, parties involved, and impact (5 in 1 in a sentence format).

I dont think I understand what you’re saying. You can however create the google sheet columns whichever way you want and then changing the setting here so the agent can try and match the existing colunms

For the column mapping, if I said Issue NCR (Summary of problem, location, time, parties involved, impact in a sentence format)

Can the AI agent know how to store it?

Because for this 5 question, I just want it to combine as a one sentence. So the column would not have the problem column, location column…

Yes part of the prompt should indicate to the agent what fields to store

Tool Name: “Add Update Sheet” or “Append Row”

Column Mapping for Google Sheets:

  • Column A: Company Name
  • Column B: Issue To
  • Column C: Issue By
  • Column D: Nature of Problem
  • Column E: Location
  • Column F: Time of Occurrence
  • Column G: Parties Involved
  • Column H: Impact
  • Column I: Issue NCR (Summary)
  • Column J: Timestamp
  • Column K: Status

Alright thanks

After user give the answer until time of occurrence(include nature of problem, location of the problem, time of occurrence), it need to proceed to check all the NCR that have any similar or closed types of problem happened before. Tabulate all the data, in a table format, include NCR number and the problem. If yes will show the NCR number and problem; otherwise will continue to ask question which is parties involved…

the “get row” is store the NCR data which is same with append row google sheets

So far my prompt have prompt correctly?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.