4 ms·
Depends on your definition. I created a mapping application that allows one to navigate and style the map with natural language (more or less) as well as some p
by colkassad 2y ago
Depends on your definition. I created a mapping application that allows one to navigate and style the map with natural language (more or less) as well as some prototype database interaction. When the user inputs a prompt, it gets sent to an "agent" whose sole purpose is to send a request to the API with a custom system prompt with few-shot examples stating something along the lines of "determine which agent should handle this request...only respond with one of [NavigationAgent, StyleAgent, ...]". When the response comes back, the prompt is then sent to the proper agent to handle the request. Each agent has function definitions for properly returning parameters to use to manipulate the map. I don't use any special libraries like langchain or anything, it's just regular API calls organized into classes that have specific system prompt behavior defined, function definitions, and some user prompt context ingestion when required (e.g. the current extent of the map).
- Oras 2y agoWhy can’t this be done with functions? I don’t see why you need the complexity and unpredictability of using “agents” to do that. I might be missing something?
- colkassad 2y agoI call them agents just because. I'm just doing function calling with custom system prompts for the most part. It's hardly complex, I wrote most of it in a few days. EDIT: I should add that the first step is used to cut down on the number of function definitions I need to send to the model on each user prompt. Navigating a map can be done with as few as four function definitions but styling a map gets out of control fast (google "Mapbox Style Specification" if you want to see why).