XML Archives - gettectonic.com
AI Agents Connect Tool Calling and Reasoning

AI Agents Connect Tool Calling and Reasoning

AI Agents: Bridging Tool Calling and Reasoning in Generative AI Exploring Problem Solving and Tool-Driven Decision Making in AI Introduction: The Emergence of Agentic AI Recent advancements in libraries and low-code platforms have simplified the creation of AI agents, often referred to as digital workers. Tool calling stands out as a key capability that enhances the “agentic” nature of Generative AI models, enabling them to move beyond mere conversational tasks. By executing tools (functions), these agents can act on your behalf and tackle intricate, multi-step problems requiring sound decision-making and interaction with diverse external data sources. This insight explores the role of reasoning in tool calling, examines the challenges associated with tool usage, discusses common evaluation methods for tool-calling proficiency, and provides examples of how various models and agents engage with tools. Reasoning as a Means of Problem-Solving Successful agents rely on two fundamental expressions of reasoning: reasoning through evaluation and planning, and reasoning through tool use. While both reasoning expressions are vital, they don’t always need to be combined to yield powerful solutions. For instance, OpenAI’s new o1 model excels in reasoning through evaluation and planning, having been trained to utilize chain of thought effectively. This has notably enhanced its ability to address complex challenges, achieving human PhD-level accuracy on benchmarks like GPQA across physics, biology, and chemistry, and ranking in the 86th-93rd percentile on Codeforces contests. However, the o1 model currently lacks explicit tool calling capabilities. Conversely, many models are specifically fine-tuned for reasoning through tool use, allowing them to generate function calls and interact with APIs effectively. These models focus on executing the right tool at the right moment but may not evaluate their results as thoroughly as the o1 model. The Berkeley Function Calling Leaderboard (BFCL) serves as an excellent resource for comparing the performance of various models on tool-calling tasks and provides an evaluation suite for assessing fine-tuned models against challenging scenarios. The recently released BFCL v3 now includes multi-step, multi-turn function calling, raising the standards for tool-based reasoning tasks. Both reasoning types are powerful in their own right, and their combination holds the potential to develop agents that can effectively deconstruct complex tasks and autonomously interact with their environments. For more insights into AI agent architectures for reasoning, planning, and tool calling, check out my team’s survey paper on ArXiv. Challenges in Tool Calling: Navigating Complex Agent Behaviors Creating robust and reliable agents necessitates overcoming various challenges. In tackling complex problems, an agent often must juggle multiple tasks simultaneously, including planning, timely tool interactions, accurate formatting of tool calls, retaining outputs from prior steps, avoiding repetitive loops, and adhering to guidelines to safeguard the system against jailbreaks and prompt injections. Such demands can easily overwhelm a single agent, leading to a trend where what appears to an end user as a single agent is actually a coordinated effort of multiple agents and prompts working in unison to divide and conquer the task. This division enables tasks to be segmented and addressed concurrently by distinct models and agents, each tailored to tackle specific components of the problem. This is where models with exceptional tool-calling capabilities come into play. While tool calling is a potent method for empowering productive agents, it introduces its own set of challenges. Agents must grasp the available tools, choose the appropriate one from a potentially similar set, accurately format the inputs, execute calls in the correct sequence, and potentially integrate feedback or instructions from other agents or humans. Many models are fine-tuned specifically for tool calling, allowing them to specialize in selecting functions accurately at the right time. Key considerations when fine-tuning a model for tool calling include: Common Benchmarks for Evaluating Tool Calling As tool usage in language models becomes increasingly significant, numerous datasets have emerged to facilitate the evaluation and enhancement of model tool-calling capabilities. Two prominent benchmarks include the Berkeley Function Calling Leaderboard and the Nexus Function Calling Benchmark, both utilized by Meta to assess the performance of their Llama 3.1 model series. The recent ToolACE paper illustrates how agents can generate a diverse dataset for fine-tuning and evaluating model tool use. Here’s a closer look at each benchmark: Each of these benchmarks enhances our ability to evaluate model reasoning through tool calling. They reflect a growing trend toward developing specialized models for specific tasks and extending the capabilities of LLMs to interact with the real world. Practical Applications of Tool Calling If you’re interested in observing tool calling in action, here are some examples to consider, categorized by ease of use, from simple built-in tools to utilizing fine-tuned models and agents with tool-calling capabilities. While the built-in web search feature is convenient, most applications require defining custom tools that can be integrated into your model workflows. This leads us to the next complexity level. To observe how models articulate tool calls, you can use the Databricks Playground. For example, select the Llama 3.1 405B model and grant access to sample tools like get_distance_between_locations and get_current_weather. When prompted with, “I am going on a trip from LA to New York. How far are these two cities? And what’s the weather like in New York? I want to be prepared for when I get there,” the model will decide which tools to call and what parameters to provide for an effective response. In this scenario, the model suggests two tool calls. Since the model cannot execute the tools, the user must input a sample result to simulate. Suppose you employ a model fine-tuned on the Berkeley Function Calling Leaderboard dataset. When prompted, “How many times has the word ‘freedom’ appeared in the entire works of Shakespeare?” the model will successfully retrieve and return the answer, executing the required tool calls without the user needing to define any input or manage the output format. Such models handle multi-turn interactions adeptly, processing past user messages, managing context, and generating coherent, task-specific outputs. As AI agents evolve to encompass advanced reasoning and problem-solving capabilities, they will become increasingly adept at managing

Read More
ChatGPT for Keywords

ChatGPT for Keywords

Maximizing SEO on a Budget: A Guide for Business Owners For business owners working within tight budgets, stretching every marketing dollar is crucial. While hiring expensive SEO experts can be tempting, there’s a wealth of untapped keywords that are already working for your competitors. The key is to uncover them and use them to your advantage. No need for costly SEO tools—there are simple ways to spy on competitors’ keywords and create engaging content, all with free resources like ChatGPT. 1. Analyze Competitor Content Using ChatGPT That blog post from a competitor ranking above yours? It holds valuable keyword insights. By copying the link and asking ChatGPT to analyze it, you can easily discover the keywords they’re targeting. Simply ask: “ChatGPT, based on this content, what keywords is my competitor targeting?” ChatGPT will break down the keywords, providing insights you can use to optimize your own content. 2. Spy on Competitors’ Sitemaps A website’s sitemap is like a blueprint, showing how everything is organized. To access a competitor’s sitemap, simply add /sitemap.xml to the end of their URL. For example, if your competitor’s site is example.com, you would visit example.com/sitemap.xml. Once you access their sitemap, copy the URLs and ask ChatGPT to extract relevant keywords for you. This method is a goldmine for discovering what content your competitors are focusing on. 3. Use Search Operators for Targeted Research Search operators are powerful tools that let you search a competitor’s site with precision. For example, typing site:competitor.com SEO in Google will display all the SEO-related content from that competitor. To make keyword extraction even easier, use a tool like the SERP Snippet Extractor from the Chrome Web Store. Once you’ve gathered the titles, paste them into ChatGPT to extract keywords. 4. Check Keyword Volume with Google Keyword Planner Once you’ve gathered a list of keywords, head over to Google Keyword Planner (create a free Google Ads account if you don’t already have one). Use the “Get Search Volume” option to see search volumes and competition levels for your keywords. Pay close attention to suggested related keywords, as they can offer additional opportunities. Checking trends for seasonal patterns can also help you time your content for maximum impact. Final Thoughts Leveraging free tools like ChatGPT can help business owners on a budget optimize their SEO strategies without breaking the bank. By analyzing competitor content, spying on sitemaps, and using search operators, you can uncover valuable keywords and improve your website’s ranking—all without costly investments. Like Related Posts Salesforce OEM AppExchange Expanding its reach beyond CRM, Salesforce.com has launched a new service called AppExchange OEM Edition, aimed at non-CRM service providers. Read more The Salesforce Story In Marc Benioff’s own words How did salesforce.com grow from a start up in a rented apartment into the world’s Read more Salesforce Jigsaw Salesforce.com, a prominent figure in cloud computing, has finalized a deal to acquire Jigsaw, a wiki-style business contact database, for Read more Health Cloud Brings Healthcare Transformation Following swiftly after last week’s successful launch of Financial Services Cloud, Salesforce has announced the second installment in its series Read more

Read More
Integrate Copilot for Service in Salesforce

Integrate Copilot for Service in Salesforce

Embedding Copilot for Service in Salesforce Desktop You can embed Copilot for Service directly into the Salesforce desktop with contextual awareness of the underlying platform. This integration helps Copilot for Service provide better responses and streamlines the workflow for your agents. Integrate Copilot for Service in Salesforce. Prerequisites Before you begin, ensure you have the following: Step 1: Copy the Copilot for Service Widget URL Step 2: Configure the Copilot for Service Widget in Salesforce xmlCopy code<section sortOrder=”0″ name=”reqGeneralInfo” label=”General Information”> <item sortOrder=”0″ name=”reqInternalName” label=”Internal Name”>CopilotForService</item> <item sortOrder=”1″ name=”reqDisplayName” label=”Display Name”>Copilot For Service</item> <item sortOrder=”2″ name=”reqAdapterUrl” label=”CTI Adapter URL”>https://TobeUpdated.ms</item> <item sortOrder=”3″ name=”reqUseApi” label=”Use CTI API”>true</item> <item sortOrder=”4″ name=”reqSoftphoneHeight” label=”Softphone Height”>600</item> <item sortOrder=”5″ name=”reqSoftphoneWidth” label=”Softphone Width”>450</item> <item sortOrder=”6″ name=”reqSalesforceCompatibilityMode” label=”Salesforce Compatibility Mode”>Classic_and_Lightning</item> </section> Step 3: Add Salesforce Users Step 4: Add the Softphone Utility Step 5: Enable Popups Like1 Related Posts Salesforce OEM AppExchange Expanding its reach beyond CRM, Salesforce.com has launched a new service called AppExchange OEM Edition, aimed at non-CRM service providers. Read more The Salesforce Story In Marc Benioff’s own words How did salesforce.com grow from a start up in a rented apartment into the world’s Read more Salesforce Jigsaw Salesforce.com, a prominent figure in cloud computing, has finalized a deal to acquire Jigsaw, a wiki-style business contact database, for Read more Health Cloud Brings Healthcare Transformation Following swiftly after last week’s successful launch of Financial Services Cloud, Salesforce has announced the second installment in its series Read more

Read More
Prompt Decomposition

Prompt Decomposition

Optimizing Generative AI: Overcoming Adoption Barriers Through Prompt Decomposition Understand and Control Every Element of Your Workload Prompt Decomposition decompose the task into steps that focus on age date and interest allowing for accurate recommendations based on predefined test cases. Challenges in Scaling Generative AI As Generative AI Specialist at AWS, Iweve worked with over 50 customers in the last 18 months, encountering numerous generative AI proof of concepts (PoCs). Many teams struggle to move beyond the PoC stage due to several common challenges: Solution: Prompt Decomposition Prompt decomposition offers a solution to these common issues by breaking down complex prompts into manageable parts. While other techniques exist, prompt decomposition stands out for its ability to address these blockers effectively. Does Prompt Decomposition Really Work? Yes, it does. This technique has proven effective in unlocking scalability for some of AWS’s largest clients across various sectors. In this blog post, I will share code examples for two use cases that illustrate how prompt decomposition can improve accuracy and reduce latency. Each example will demonstrate changes in cost, latency, and accuracy before and after applying prompt decomposition. Example Results What is Prompt Decomposition? Prompt decomposition involves breaking down a complex prompt into smaller, more manageable components. This approach simplifies large tasks into sequential, manageable steps, improving execution efficiency. Example: Summer Camp Recommendation System Consider a system recommending summer camps based on a child’s age, desired camp date, and interests. The process can be decomposed into three steps: Parallel Execution For particularly lengthy prompts, decomposing them into parallel tasks can significantly reduce execution time. For example, a prompt initially taking 43 seconds can be broken into three parallel parts, reducing the total execution time to under 10 seconds without sacrificing accuracy. Conclusion Prompt decomposition is a powerful technique to overcome common challenges in generative AI projects. By breaking down complex tasks, teams can improve accuracy, manage costs and latency, and gain better control and metrics, leading to more scalable and reliable solutions. Ready to Build? For those ready to dive in, full code examples are available in the GitHub repository linked below. The repository includes a Jupyter Notebook (Prompt_Decomposition.ipynb) with two examples: one focused on accuracy and the other on latency. An updated evaluation function for multithreaded calls to Amazon Bedrock is also included. Starting with Evaluation Automated evaluation is crucial for assessing generative AI performance. Begin with a gold standard set of input/output pairs created by humans to serve as a benchmark. Avoid using generative AI to create this set, as it may introduce inaccuracies. The evaluation function compares the correct and generated answers, scoring them similarly to how a teacher would grade student work. Here’s a sample evaluation prompt: pythonCopy codetest_prompt_template_system = “””You are a detail-oriented teacher. You are grading an exam, looking at a correct answer and a student submitted answer. Your goal is to score the student answer based on how close it is to the correct answer. This is a pass/fail test. If the two answers are basically the same, the score should be 100. Minor things like punctuation, capitalization, or spelling should not impact the score. If the two answers are different, then the score should be 0. Please use your score in a ‘score’ XML tag, and any reasoning in a ‘reason’ XML tag. “”” Task-Based Decomposition Example For a summer camp recommendation system, we decompose the task into steps that focus on age, date, and interests, allowing for accurate recommendations based on predefined test cases. Volume-Based Decomposition Use Case To handle long prompts efficiently, such as analyzing an entire novel, we break the task into smaller, parallel parts, significantly improving execution time and accuracy. Prompt Decomposition Creating a flowchart for your task and selecting the best tools for each step can greatly enhance your generative AI workflows. Explore the full code in the GitHub repository, and feel free to comment with questions or share your own experiences. Let’s build something amazing by breaking it down into manageable pieces! Like Related Posts Salesforce OEM AppExchange Expanding its reach beyond CRM, Salesforce.com has launched a new service called AppExchange OEM Edition, aimed at non-CRM service providers. Read more The Salesforce Story In Marc Benioff’s own words How did salesforce.com grow from a start up in a rented apartment into the world’s Read more Salesforce Jigsaw Salesforce.com, a prominent figure in cloud computing, has finalized a deal to acquire Jigsaw, a wiki-style business contact database, for Read more Health Cloud Brings Healthcare Transformation Following swiftly after last week’s successful launch of Financial Services Cloud, Salesforce has announced the second installment in its series Read more

Read More
Salesforce JSON

Salesforce JSON

Today we are diving into JSON (JavaScript Object Notation) and exploring why it’s a crucial concept for you to understand. JSON is a data representation format widely used across the internet for APIs, configuration files, and various applications JSON Class Contains methods for serializing Apex objects into JSON format and deserializing JSON content that was serialized using the serialize method in this class. Usage Use the methods in the System.JSON class to perform round-trip JSON serialization and deserialization of Apex objects. Roundtrip Serialization and Deserialization Use the JSON class methods to perform roundtrip serialization and deserialization of your JSON content. These methods enable you to serialize objects into JSON-formatted strings and to deserialize JSON strings back into objects. What does JSON serialize do in Salesforce? JSON. serialize() accepts both Apex collections and objects, in any combination that’s convertible to legal JSON. String jsonString = JSON. What is the difference between JSON parse and JSON deserialize? The parser converts the JSON data into a data structure that can be easily processed by the programming language. On the other hand, JSON Deserialization is the process of converting JSON data into an object in a programming language. What is the difference between JSON and XML in Salesforce? JSON supports numbers, objects, strings, and Boolean arrays. XML supports all JSON data types and additional types like Boolean, dates, images, and namespaces. JSON has smaller file sizes and faster data transmission. XML tag structure is more complex to write and read and results in bulky files. Which is more secure XML or JSON? Generally speaking, JSON is more suitable for simple and small data, more readable and maintainable for web developers, faster and more efficient for web applications or APIs, supports native data types but lacks a standard schema language, and is more compatible with web technologies but less secure than XML. What is Salesforce JSON heap size limit? Salesforce enforces an Apex Heap Size Limit of 6MB for synchronous transactions and 12MB for asynchronous transactions. How to store JSON data in Salesforce object? If you need to store the actual JSON payload in Salesforce for audit purposes, Tectonic would recommend just using a Long Text Area field to store JSON content. You wouldn’t have any performance impacts when interacting with records, and if required you could add this to the layout of the child object storing this data. Like Related Posts Salesforce OEM AppExchange Expanding its reach beyond CRM, Salesforce.com has launched a new service called AppExchange OEM Edition, aimed at non-CRM service providers. Read more The Salesforce Story In Marc Benioff’s own words How did salesforce.com grow from a start up in a rented apartment into the world’s Read more Salesforce Jigsaw Salesforce.com, a prominent figure in cloud computing, has finalized a deal to acquire Jigsaw, a wiki-style business contact database, for Read more Health Cloud Brings Healthcare Transformation Following swiftly after last week’s successful launch of Financial Services Cloud, Salesforce has announced the second installment in its series Read more

Read More
Salesforce XML

XML-Based Messaging Protocol

The primary focus of the XML based messaging Protocol Working Group is to establish a framework for XML-based messaging systems. This framework encompasses the specification of a message envelope format and a method for data serialization. While the emphasis is on RPC applications, the framework adheres to the specified principles, catering not exclusively but primarily to RPC applications. XML messaging represents a rapidly growing, dynamic area of IT, a situation that makes it exciting and tiresome at the same time. As B2B exchanges and other forms of inter-business electronic communication grow, XML messaging will be more widely deployed than ever. Dirk Reinshagen, Javaworld What are XML messages? XML Messaging format is designed to facilitate the exchange of structured information in the implementation of Web Services within computer networks. An XML interface serves as the foundational layer of a web services protocol stack, providing a fundamental messaging framework upon which web services can be constructed. How can XML text messages be read? XML files are encoded in plaintext, allowing them to be easily opened and read in any text editor. To do so, right-click the XML file and select “Open With.” A list of programs to open the file will appear, and you can choose “Notepad” (Windows) or “TextEdit” (Mac) for clear readability. SOAP API (Simple Object Access Protocol) is a protocol used for accessing web services in Salesforce. It enables developers to interact with the Salesforce platform using a standardized messaging format and receive data in the form of XML. is Like Related Posts Salesforce OEM AppExchange Expanding its reach beyond CRM, Salesforce.com has launched a new service called AppExchange OEM Edition, aimed at non-CRM service providers. Read more The Salesforce Story In Marc Benioff’s own words How did salesforce.com grow from a start up in a rented apartment into the world’s Read more Salesforce Jigsaw Salesforce.com, a prominent figure in cloud computing, has finalized a deal to acquire Jigsaw, a wiki-style business contact database, for Read more Health Cloud Brings Healthcare Transformation Following swiftly after last week’s successful launch of Financial Services Cloud, Salesforce has announced the second installment in its series Read more

Read More
gettectonic.com