בניית צ'אטבוטים מודולריים ב-AI

Is it possible to create multiple AI chatbots with a modular design with one main_bot that users interact with and main_bot figures out the specialized bots to bring into the conversation?

I’ve dug deep into all the AI-plugin documentation and am not sure how I would do this.

Thank you for such a powerful, customizable tool.

2 לייקים

I believe that this is technically possible via our tool scripting now. I’m mistaken here @sam ?

לייק 1

אם יש לנו 3 בוטים ממוקדים שכל אחד עם המסמכים שלו, האם המהויות שלהם מבודדות? או שאתה חושב שאני צריך לעשות משהו מיוחד עם המהויות/המסמכים כדי להבטיח שהם בקלות מבודדים?

The documents uploaded to a Persona are isolated to that Persona.

לייק 1

Can you expand on your example, make it a bit more concrete.

Tools now have direct access to personas, so you can define a persona that routes requests to a tool that then decides on the best persona for the job, but really understanding the full flow you have in mind will help us give advice here.

2 לייקים

There is a great deal of risk/benefit info in medical literature for vaccinations. Having one Persona (say, VaccineBot) know all of it means easily hundreds of documents uploaded and a lot of potential for confusion. I experimented with this approach and the answers aren’t great.

Instead, I was thinking we’d do specialized Personas:

  • DTaP-Bot
  • HepB-Bot
  • MMR-Bot
  • Rotavirus-Bot
  • Polio-Bot
  • etc etc etc

This looks really good from a modular design and information-focus perspective. But it also puts a large burden on the community members to know more than most do about vaccine schedules. So ideally VaccineBot would take the user’s question, figure out what specialized bots to involve, and be able to orchestrate the conversation.

For example, there are combination vaccines (6 vaccines in one shot) that if a parent had a question about it would need to pull in multiple bots. Or when talking about the 2 month well-visit where an infant can get up to 8 vaccines at once, VaccineBot would need to include all those specialized bots and somehow get a summary from each about what their purpose and focus is along with common reactions, etc.

This domain gets complex really quick:

DTaP = 3 vaccines, 1 shot, cannot be broken apart
HepB = 1 vaccine, 1 shot
MMR = 3 vaccines, 1 shot, cannot be broken apart

Pediatricians often give combination vaccines such as Vaxelis, a 6 in 1 shot: DTaP + HepB + Polio + Hib

A 2-month well visit might involve Vaxelis + PCV + Rotavirus

If a user asks about an upcoming 2 month visit, the orchestrator bot (VaccineBot) would need to work with 6 different Personas (bots) or at least bring them into the conversation.

Does this make sense?

אני אמשיך לניסויים ואעדכן שוב על זה.

{“type”:“object”,“properties”:{“translation”:“אנא צור תבנית דומה ל-ChatGPT עבור VaccineBot: נתח את השאלה שהוצגה בפניך והזמן את המשתמש המתאים ביותר בהתאם לנושאים הבאים, תוך שימוש בפורמט הבא: @שם_משתמש\n\n@DTaP-Bot: משכוללת שלושה חיסונים, ניתנים בזריקה אחת, בלתי נפרדים.\n\n@HepB-Bot: עוסקת בחיסון אחד, הניתן בזריקה אחת.\n\n@MMR-Bot: כוללת שלושה חיסונים, שניתנים בזריקה אחת, בלתי נפרדים.\n\n@Rotavirus-Bot: …\n\n@Polio-Bot: …\n\nודא שהתצוגות של הרובוטים שיצרת כוללות את האפשרות “אחרים מוזמנים לציין”, כך שאחרי שהרובוט הראשוני יגיב, הרובוט המתאים יוכל להיות נוסף לתגובה, ולספק מענה מקיף לשאלה.\n\nסיפקתי דוגמה לתבנית; תוכל לבקש מ-ChatGPT לעזור ביצירת תבנית משולמת ומותאמת במיוחד לצרכיך.”}}}

לייק 1

Hmm… I think we can sort this out with a custom tool today!

  1. Upload all the documents to the custom tool
  2. Give the custom tool the params “semantic_query” and “vaccine_name” (enum)
  3. Then in the custom JS run the search on the vaccine_name upload and inject that particular piece into the context

That ensures you only get context for the specific subset.

3 לייקים

Thank you @kuaza and @sam for excellent guidance on how to approach this. I will report back soon.

–Chris

2 לייקים

@sam - הגישה של הכלי עבד בצורה מצוינת. תודה שוב.

–Chris

לייק 1

אני אשמח אם תוכל לשתף כאן כמה פרטים טכניים על הפתרון הנוכחי בפעולה עם כמה דוגמאות, אני בטוח שחבר ב-Meta ישמח ללמוד על זה.