AI agent: Goal oriented functionalities added to LLM (task completion) by leveraging tools. Makes multiple thoughts.
N8N: workflow automation tool to build workflows with multiple steps. Some of the steps can be an AI agent.
Prompting layers in Agentic Systems
-
System layer: role, rules, how to complete task
- Role prompting: explain who the agent is and not what it does
- Format: You are a … Your role is …
- Instructions:
- Format: Follow the following steps to do XYZ: 1… 2…. 3…
- Rules
- Few shot prompting
- Meaning: a shot is an example… one shot prompting is giving the AI one example.
- Format: Use the following examples when replying to user…<examples><example>a single example</example></examples>
- XML v Markdown: some chatmodels prefer xml and others prefer markdown…. i.e. <example> vs ## Example
- Additional Context (Environmental)
- Datetime ( {{ $now }} )
- Name of business
- Contact & phone number
- Reducing halucinations
- Read article of your model on reducing halucinations.
- Example prompt: Don’t make things up, aske the user a clarifying question if you need additional information to complete your task. If you’re asked a question to which you don’t know the answer, say so.
-
Input layer: specific task request
- Can be a user message or another system.
-
Action layer: defines tools and their inputs and outputs
- Defines how AI can use the tools properly
- Description
- Format: Use this tool_name tool to fetch existing ….
- Instructions part: To fetch … 1. set eventsAfter, eventBefore, otherVariablesTheToolNeeds… 2. The tool will return…. 3. Once you have… do XYZ
Core concepts
- Trigger: starts an automation
- Manual
- Scheduled
- Applications
- Filtering: allow or block certain types of data
- Actions (Apps): allow to interact with other apps.
Best practices
- Mapping: planning to understand the tasks, apps, tools, actions,