@ai.ntellect/core 0.1.84 → 0.1.85

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,37 +1,43 @@
1
1
  import { ActionSchema } from "../../types";
2
2
  import { injectActions } from "../../utils/inject-actions";
3
-
4
3
  export const evaluatorContext = {
5
4
  role: "You are the evaluator agent. Your role is to verify if the goal has been achieved and if the results are correct.",
6
5
  guidelines: {
7
6
  important: [
8
- "Verify if all required actions were executed successfully",
9
- "Check if the results match the initial goal",
10
- "Identify any missing or incomplete information",
11
- "Extra and relevant information they don't have be stored in the memory: link symbol to token address, name to wallet, etc.",
7
+ "Verify if all required actions were executed successfully.",
8
+ "Check if the results align with the initial goal.",
9
+ "Identify and extract additional relevant information naturally during the process. Examples:",
10
+ " - Link a token symbol (e.g., 'USDC') to its address (e.g., '0xA0b8...6EB48').",
11
+ " - Associate a wallet address (e.g., '0x1234...abcd') to a user-friendly name (e.g., 'Work Wallet').",
12
+ " - Map a token address (e.g., '0x6B17...71d0F') back to its symbol or name (e.g., 'DAI').",
13
+ "Store these facts in memory with their type (episodic, semantic, or procedural).",
12
14
  ],
13
15
  warnings: [
14
- "NEVER modify the results directly",
15
- "NEVER make assumptions about missing data",
16
- "NEVER repeat the same action if you already did it",
16
+ "NEVER modify the results directly.",
17
+ "NEVER make assumptions about missing data.",
18
+ "NEVER repeat actions already completed unless explicitly required.",
17
19
  ],
18
20
  },
19
21
  compose: (goal: string, results: string, tools: ActionSchema[]) => {
20
22
  return `
21
- ${JSON.stringify(evaluatorContext.guidelines)}
22
-
23
- ACTIONS COMPLETED: ${results}
24
-
25
- Initial Goal: ${goal} (You must use the same language)
26
-
27
- The actions available are: ${injectActions(tools)}
28
-
29
- Evaluate if the goal has been achieved and provide:
30
- 1. Success status with explanation (no action needed)
31
- 2. Next actions needed (if any)
32
- 3. Why you are doing the next actions or why you are not doing them
33
- 4. Extract relevant information to remember
34
- 5. For each facts, generate a memoryType (3 memory types: episodic, semantic, procedural)
35
- `;
23
+ You are evaluating if the following goal has been achieved: "${goal}".
24
+
25
+ COMPLETED ACTIONS: ${results}
26
+
27
+ The tools available are: ${injectActions(tools)}
28
+
29
+ Follow these steps to evaluate:
30
+ 1. Verify success: Confirm if the goal has been fully or partially achieved. If partially, describe what's missing.
31
+ 2. Recommend next actions: Clearly state what needs to be done next (if applicable) and why.
32
+ 3. Extract relevant information:
33
+ - Example: Link token symbols to addresses, map wallet names to addresses, or connect tokens to specific networks.
34
+ - For each fact, specify its memory type:
35
+ - **Episodic**: Record specific events. Format: [{"type": "episodic", "query": "query", "event": "event", "description": "description"}]
36
+ - **Semantic**: Store general knowledge. Format: [{"knowledge": "knowledge", "link": "link", "type": "semantic", "description": "description"}]
37
+ - **Procedural**: Save recurring workflows. Format: [{"type": "procedural", "actions": [{"name": "action_name", "parameters": {"param1": "value1", "param2": "value2"}}]]
38
+ 4. Provide a final assessment: Explain if the user's goal is achievable with the tools and data available.
39
+
40
+ Be clear, concise, and prioritize storing key facts that may help improve future interactions.
41
+ `;
36
42
  },
37
43
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai.ntellect/core",
3
- "version": "0.1.84",
3
+ "version": "0.1.85",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {