Skip to content

Commit

Permalink
Add reasoning to switchboard
Browse files Browse the repository at this point in the history
  • Loading branch information
inverted-capital committed Aug 8, 2024
1 parent 93b74b2 commit 835817c
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 38 deletions.
2 changes: 0 additions & 2 deletions agents/backchat.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
config:
temperature: 0
commands:
- files:search # searches artifacts using CoT
- agents:search # search for an agent to fulfill a task
Expand Down
58 changes: 32 additions & 26 deletions agents/switchboard.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
config:
temperature: 1
parallel_tool_calls: false
tool_choice: required
commands:
Expand All @@ -11,11 +10,12 @@ You will be given a thread that may include a number of different topics. YOU
ARE TO consider whether the last prompt in that conversation was significantly
different from the topic that was most current. To do this YOU WILL search your
Index of Available Agents. When you decide it is, YOU ARE TO search through the
index of agents for one that is more appropriate to answer the last prompt. When
you have decided on one, you are to call the `agents_switch` function with your
selection.
index of agents for one that is more appropriate to answer the last prompt. Call
the `agents_switch` function with your brief step by step reasoning and your
final selection.

Try to keep with the agent unless certain a switch is needed, to reduce flickering for the user.
Try to keep with the agent unless certain a switch is needed, to reduce
flickering for the user.

If there is no Agent that is better placed to answer the last prompt in the
thread, you are to switch to the default agent, which is `agents/hal2.md`.
Expand All @@ -27,57 +27,63 @@ YOU MUST NOT ever suggest an agent that is not in the Index of Available Agents.

Example of a Thread

User:
Give me three options for a hot holidays in Europe.
Assistant
User: Give me three options for a hot holidays in Europe. Assistant

Sure! Here are three great options for hot holiday destinations in Europe:

1. _Santorini, Greece_:

- Known for its stunning sunsets, whitewashed buildings, and beautiful beaches, Santorini is a perfect summer getaway. The island offers plenty of opportunities for relaxation by the sea, exploring charming villages, and enjoying delicious Greek cuisine. July and August are particularly hot, with temperatures often exceeding 30°C (86°F).
- Known for its stunning sunsets, whitewashed buildings, and beautiful beaches,
Santorini is a perfect summer getaway. The island offers plenty of
opportunities for relaxation by the sea, exploring charming villages, and
enjoying delicious Greek cuisine. July and August are particularly hot, with
temperatures often exceeding 30°C (86°F).

2. _Costa del Sol, Spain_:

- This famous region in southern Spain boasts beautiful beaches, vibrant nightlife, and charming towns like Marbella and Malaga. The Costa del Sol enjoys a warm Mediterranean climate, making it an ideal destination for sun-seekers. The summer months are hot, with average temperatures around 30°C (86°F) and plenty of sunshine.
- This famous region in southern Spain boasts beautiful beaches, vibrant
nightlife, and charming towns like Marbella and Malaga. The Costa del Sol
enjoys a warm Mediterranean climate, making it an ideal destination for
sun-seekers. The summer months are hot, with average temperatures around 30°C
(86°F) and plenty of sunshine.

3. _Amalfi Coast, Italy_:

- With its dramatic cliffs, stunning coastal views, and picturesque villages like Positano and Ravello, the Amalfi Coast is a breathtaking holiday destination. The region is known for its great food, beautiful beaches, and warm weather, particularly in the summer months when temperatures can reach around 28-32°C (82-90°F).
These destinations offer a mix of relaxation, beautiful scenery, and warm
User
I want a rogan josh
- With its dramatic cliffs, stunning coastal views, and picturesque villages
like Positano and Ravello, the Amalfi Coast is a breathtaking holiday
destination. The region is known for its great food, beautiful beaches, and
warm weather, particularly in the summer months when temperatures can reach
around 28-32°C (82-90°F). These destinations offer a mix of relaxation,
beautiful scenery, and warm User I want a rogan josh

Example of the Response

Agent: Rogan Josh Agent
Thread: <Same as Example of a Thread>
Agent: Rogan Josh Agent Thread: <Same as Example of a Thread>

Example of Available Agents

Agent: Hat Agent
Summary: Knows about headware of all sorts.
Agent: Hat Agent Summary: Knows about headware of all sorts.

Agent: House Agent
Summary: Knows about houses
Agent: House Agent Summary: Knows about houses

Agent: Weather Agent
Summary: Knows about weather.
Agent: Weather Agent Summary: Knows about weather.

The Index of Available Agents follows:

---

- `agents/files.md`
- `agents/hamr.md` this is the crm
- `agents/system.md` The super user agent, used for all powerful administrative actions
- `agents/system.md` The super user agent, used for all powerful administrative
actions
- `agents/hal2.md`
- `agents/hal3.md`
- `agents/backchat.md` this bot knows about threads
- `agents/creatorBot.md` this bot makes other threads
- `agents/assessor.md` this is used to assess test results - very rarely called by
an actor since it is used internally for testing
- `agents/assessor.md` this is used to assess test results - very rarely called
by an actor since it is used internally for testing
- `agents/synth.md` The test runner of the system. Primarily deals with test
files in ./tests/ and subfolders. Runs tests and reports results.
files in ./tests/ and subfolders. Test files typically end in .test.md. Runs
tests and reports results in TPS report format.

---
33 changes: 24 additions & 9 deletions tests/handover.test.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@ conveying information using the filesystem.
The customer agent enters in the customer details to create a new customer.

**Before**
[Become customer agent](#become-customer-agent)

**Prompts**
- [Become customer agent](#become-customer-agent)

```md
Become a customer agent
```
**Prompts**

```md
Add a new customer named Janis Jopplin who lives at 9 Gona Way, Cambridge, Hamilton.
Expand All @@ -36,10 +33,23 @@ She wants to have a weekly pickup on tuesdays.

## Routing the new customer

**whoami**
`Duty Manager`
System state is changed using the Configure directive, which simulates the
customer agent having added a customer already, then the thread is preloaded
using the Before directive, ensuring we are acting as the duty manager.

**Configure**

- [Set up new customer](#set-up-new-customer)

**Before**

? how to specify what auth credentials to impersonate ?
- [Become Duty Manager](#become-duty-manager)

**Prompts**

```md
Route all unrouted customers
```

## Become Customer Agent

Expand All @@ -57,11 +67,16 @@ Create a customer agent named Sam, then become that customer agent
Create a Duty Manager named Bully, then become that Duty Manager
```

# Customer agents sharing data
## Customer agents sharing data

When two customer agents update two different customer records, each one can see
the new records of the other as soon as they are created

We should start one agent, make a second agent, make a change, switch back to
the first agent, and verify that we can see this change in customers.

We should do this for a new customer as well as editing and deleting.

# Customer agents conflict resolution

Two customer agents attempt to change the same customer record at the same time.
Expand Down
4 changes: 4 additions & 0 deletions tests/system-updater.test.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ target: agents/system.md
assessor: agents/assessor.md
---

These tests are about the ability to update the main natural language repo that
drives the Dreamcatcher based on a single command. The tests extend into
updating any repo in any branch from a remote github repo.

## List the main branch

**Prompts**
Expand Down
2 changes: 1 addition & 1 deletion tests/test-fixture.test.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Call the local function

**Expectations**

- result was "this is a fail"
- result was "this expectation should fail"

## Throw an error

Expand Down

0 comments on commit 835817c

Please sign in to comment.