- ragbot.ai (เดิมชื่อ RBOT): ผู้ช่วย AI Operation AID ของ Rajiv เพิ่มพลังของโมเดลภาษาขนาดใหญ่ (LLMS) เข้ากับ Generation Augmented Retrieval (RAG)
ragbot.ai ประมวลผลผู้ใช้พร้อมกับคำแนะนำที่กำหนดเองและชุดข้อมูลที่ดูแลรักษาช่วยให้การตอบสนองที่ตระหนักถึงบริบท ขับเคลื่อนโดย LLMs รวมถึง GPT ของ OpenAI และ Claude ของมานุษยวิทยา Ragbot.ai ใช้ RAG ซึ่งเป็นเทคนิคที่รวมพลังของการดึงข้อมูลที่หนาแน่นและได้รับการฝึกฝนมาก่อนและรุ่นต่อลำดับเพื่อสร้างข้อความที่เป็นข้อเท็จจริงและข้อมูลมากขึ้น
- คำแนะนำที่กำหนดเองและชุดข้อมูลที่รวบรวมไว้ช่วย ragbot.ai เข้าใจบริบทที่ดีขึ้นส่งผลให้เกิดการตอบสนองส่วนบุคคลที่แม่นยำยิ่งขึ้นและเกี่ยวข้องมากกว่าความสามารถในการออกจากกล่อง LLMS
พัฒนาโดย Rajiv Pant
ผู้สนับสนุนรหัสและผู้ทำงานร่วมกัน
วิธีการมีส่วนร่วม
ยินดีต้อนรับการบริจาครหัสของคุณ โปรดแยกที่เก็บและส่งคำขอดึงพร้อมการปรับปรุงของคุณ
แนะนำ ragbot.ai: ผู้ช่วย AI ส่วนบุคคลเขียนโดย ragbot.ai
ข้อความที่ตัดตอนมาจากโพสต์บล็อก:
ในฐานะผู้ช่วย AI ฉันให้ระดับความเป็นส่วนตัวและการปรับตัวที่ไม่เหมือนใครซึ่งทำให้ฉันแตกต่างจากการใช้งานปัจจุบันของ Chatgpt Plus, Bing Chat และ Google Bard ด้วยการใช้โฟลเดอร์ที่มีไฟล์ชุดข้อมูลที่กำหนดเองฉันสามารถตอบสนองต่อกรณีการใช้งานหลายกรณีเช่นชีวิตส่วนตัวการทำงานการศึกษาและโครงการเฉพาะ การปรับแต่งนี้ช่วยให้ฉันเข้าใจและสนับสนุนคุณในแบบที่เหมาะกับความต้องการเฉพาะของคุณ
คุณสามารถสร้างโฟลเดอร์ที่มีไฟล์ชุดข้อมูลที่รวบรวมไว้ซึ่งรวมถึงข้อมูลส่วนบุคคลรายละเอียดครอบครัวการตั้งค่าการเดินทางและอาหารและอื่น ๆ ด้วยการใช้ข้อมูลนี้ฉันสามารถทำหน้าที่เป็นผู้ช่วยชีวิตส่วนตัวของคุณเสนอคำแนะนำที่ขับเคลื่อนด้วย AI และสนับสนุนที่ปรับให้เหมาะกับบริบทเฉพาะของคุณ
ในทำนองเดียวกันคุณสามารถพัฒนาโฟลเดอร์อื่นที่มีไฟล์ชุดข้อมูลที่ดูแลเกี่ยวกับอายุการทำงานของคุณ ไฟล์เหล่านี้อาจรวมถึงรายละเอียดเกี่ยวกับงานอุตสาหกรรมเพื่อนร่วมงานโครงการและข้อมูลอื่น ๆ ที่เกี่ยวข้องกับการทำงาน ด้วยบริบทนี้ฉันสามารถช่วยคุณในงานต่าง ๆ เช่นการร่างอีเมลการประชุมการจัดตารางเวลาการทำวิจัยและอื่น ๆ เพิ่มประสิทธิภาพและองค์กรของคุณ
นอกจากนี้คุณยังสามารถปรับแต่งฉันเพื่อวัตถุประสงค์ทางการศึกษาโดยการสร้างโฟลเดอร์ที่มีไฟล์ชุดข้อมูลที่รวบรวมไว้ซึ่งมีข้อมูลเกี่ยวกับภูมิหลังทางวิชาการของคุณวิชาที่น่าสนใจหลักสูตรและรายละเอียดการศึกษาอื่น ๆ ในบทบาทนี้ฉันสามารถให้การสนับสนุนการศึกษาส่วนบุคคลจากการช่วยเหลือการบ้านไปจนถึงการอธิบายแนวคิดที่ซับซ้อนหรือแนะนำแหล่งข้อมูลการเรียนรู้
นอกเหนือจากกรณีการใช้งานที่กล่าวถึงข้างต้นฉันสามารถปรับแต่งเพื่อสนับสนุนคุณในโครงการเฉพาะ ด้วยการสร้างโฟลเดอร์ที่มีไฟล์ชุดข้อมูลที่จัดทำขึ้นซึ่งมีข้อมูลที่เกี่ยวข้องกับโครงการเช่นวัตถุประสงค์สมาชิกในทีมกำหนดเวลาและทรัพยากรที่เกี่ยวข้องฉันสามารถช่วยเหลือคุณได้ตลอดวงจรชีวิตของโครงการนำเสนอข้อมูลเชิงลึกที่มีคุณค่าและการสนับสนุนที่เหมาะกับแต่ละโครงการที่ไม่ซ้ำกัน
ความสามารถของฉันในการสร้างโปรไฟล์ที่แตกต่างกันสำหรับความต้องการที่แตกต่างกันโดยใช้ไฟล์ชุดข้อมูลที่กำหนดเองทำให้ฉันแตกต่างจาก Chatgpt Plus, Bing Chat และ Google Bard ความเก่งกาจนี้ช่วยให้ฉันสามารถให้ความช่วยเหลือส่วนบุคคลในหลายแง่มุมของชีวิตของคุณเพื่อให้มั่นใจว่าฉันสามารถเข้าใจและตอบสนองความต้องการเฉพาะของคุณ
อ่านคู่มือการติดตั้งและคู่มือการกำหนดค่าและส่วนบุคคล



generate_prompt_template.py เป็นสคริปต์ Python ที่สร้างเทมเพลตพรอมต์สำหรับผู้ช่วย AI โดยการเชื่อมต่อคำแนะนำที่กำหนดเองและชุดข้อมูลที่ดูแล ช่วยให้ผู้ใช้สร้างความเป็นส่วนตัวและรับรู้บริบทเพื่อเพิ่มประสิทธิภาพของเครื่องมือที่ขับเคลื่อนด้วย AI
สำหรับข้อมูลโดยละเอียดเกี่ยวกับวิธีการใช้ generate_prompt_template.py และผลประโยชน์ของมันโปรดดูที่คู่มือการสร้างพรอมต์เทมเพลต
rajivpant@rp-2023-mac-mini ragbot % ./ragbot --help
usage: ragbot.py [-h] [-ls] [-p PROMPT | -f PROMPT_FILE | -i | --stdin]
[-profile PROFILE] [-c [CUSTOM_INSTRUCTIONS ...]] [-nc]
[-d [CURATED_DATASET ...]] [-nd]
[-e {openai,anthropic,google}] [-m MODEL] [-t TEMPERATURE]
[-mt MAX_TOKENS] [-l LOAD]
Ragbot.AI is an augmented brain and asistant. Learn more at https://ragbot.ai
options:
-h, --help show this help message and exit
-ls, --list-saved List all the currently saved JSON files.
-p PROMPT, --prompt PROMPT
The user's input to generate a response for.
-f PROMPT_FILE, --prompt_file PROMPT_FILE
The file containing the user's input to generate a
response for.
-i, --interactive Enable interactive assistant chatbot mode.
--stdin Read the user's input from stdin.
-profile PROFILE, --profile PROFILE
Name of the profile to use.
-c [CUSTOM_INSTRUCTIONS ...], --custom_instructions [CUSTOM_INSTRUCTIONS ...]
Path to the prompt custom instructions file or folder.
Can accept multiple values.
-nc, --nocusom_instructions
Ignore all prompt custom instructions even if they are
specified.
-d [CURATED_DATASET ...], --curated_dataset [CURATED_DATASET ...]
Path to the prompt context curated dataset file or
folder. Can accept multiple values.
-nd, --nocurated_dataset
Ignore all prompt context curated dataset even if they
are specified.
-e {openai,anthropic,google}, --engine {openai,anthropic,google}
The engine to use for the chat.
-m MODEL, --model MODEL
The model to use for the chat. Defaults to engine's
default model.
-t TEMPERATURE, --temperature TEMPERATURE
The creativity of the response, with higher values
being more creative.
-mt MAX_TOKENS, --max_tokens MAX_TOKENS
The maximum number of tokens to generate in the
response.
-l LOAD, --load LOAD Load a previous interactive session from a file.
rajivpant@rp-2023-mac-mini ragbot % ในการใช้ ragbot.ai คุณสามารถจัดเตรียมไฟล์ชุดข้อมูลที่ดูแลและ/หรือโฟลเดอร์ที่มีไฟล์ชุดข้อมูลที่รวบรวมไว้หลายไฟล์ คุณสามารถดูตัวอย่างของไฟล์ชุดข้อมูลที่ดูแลได้ที่ https://github.com/rajivpant/ragbot/tree/main/example-curated-datasets
ตัวอย่างที่ 1:
rajivpant@RP-2021-MacBook-Pro ragbot % ./ragbot.py -d custom-instructions/ curated-datasets/public/ ../ragbot-private/curated-datasets/personal/ ../ragbot-private/curated-datasets/hearst -p " Write a short note in Rajiv's voice about Rajiv's job, coworkers, family members, and travel and food preferences for the person temporarily backfilling for his EA. "
curated datasets being used:
- custom-instructions/
- curated-datasets/public/travel-food.md
- curated-datasets/public/employment-history.md
- curated-datasets/public/about.md
- curated-datasets/public/biography.md
- ../ragbot-private/curated-datasets/personal/accounts.md
- ../ragbot-private/curated-datasets/personal/contact-info.md
- ../ragbot-private/curated-datasets/personal/personal-family.md
- ../ragbot-private/curated-datasets/hearst/hearst.md
Using AI engine openai with model gpt-4
[redacted in this example]ตัวอย่างที่ 2:
rajivpant@RP-2021-MacBook-Pro ragbot % ./ragbot.py -d custom-instructions/ curated-datasets/public/ -p " Write a short resume of Rajiv "
curated datasets being used:
- custom-instructions/
- curated-datasets/public/travel-food.md
- curated-datasets/public/employment-history.md
- curated-datasets/public/about.md
- curated-datasets/public/biography.md
Using AI engine openai with model gpt-4
[truncated in this example]ตัวอย่างที่ 3:
./ragbot.py -p "Tell me a story about a brave knight and a wise wizard." -d curated datasets/story_characters หากต้องการใช้ ragbot.ai ในโหมดอินเทอร์แอคทีฟให้ใช้ธง -i หรือ --interactive โดยไม่ต้องให้พรอมต์ผ่านบรรทัดคำสั่งหรือไฟล์อินพุต ในโหมดนี้คุณสามารถป้อนพรอมต์ติดตามหลังจากการตอบกลับแต่ละครั้ง
ตัวอย่าง:
./ragbot.py -i -d curated-datasets/story_characters ในตัวอย่างแรก ragbot.ai สร้างโน้ตสั้น ๆ ในเสียงของ Rajiv โดยใช้ไฟล์ชุดข้อมูลที่ดูแลใน ../ragbot-private/curated-datasets curated-datasets โฟลเดอร์ ในตัวอย่างที่สอง ragbot.ai ให้ข้อมูลเกี่ยวกับแนวทางปฏิบัติที่ดีสำหรับการพัฒนาซอฟต์แวร์โดยใช้ไฟล์ชุดข้อมูล curated-datasets/software_development.txt Curated DataSet ในตัวอย่างที่สาม ragbot.ai บอกเล่าเรื่องราวเกี่ยวกับอัศวินผู้กล้าหาญและตัวช่วยสร้างที่ชาญฉลาดโดยใช้ไฟล์ชุดข้อมูลที่ดูแลใน curated-datasets/story_characters
rajivpant@RP-2021-MacBook-Pro ragbot % ./ragbot.py -d ragbot.py -p " if no curated dataset files are being used, then I want the code to show that. "
curated datasets being used:
- ragbot.py
Using AI engine openai with model gpt-4
To modify the code to show a message when no curated dataset files are being used, you can add an else statement after checking for the curated dataset files. Update the code in the `main()` function as follows:
```python
if curated_dataset_files:
print("curated datasets being used:")
for file in curated_dataset_files:
print(f" - {file}")
else:
print("No curated dataset files are being used.")
```
This will print "No curated dataset files are being used." when there are no curated dataset files detected.
rajivpant@RP-2021-MacBook-Pro ragbot %
ขอให้เดาว่าไฟล์ชุดข้อมูลที่ฉันใช้เป็นอย่างไร
rajivpant@RP-2021-MacBook-Pro ragbot % find curated-datasets ../ragbot-private/curated-datasets -print | ./ragbot.py -d custom-instructions/ curated-datasets/public/ ../ragbot-private/curated-datasets/personal/ ../ragbot-private/curated-datasets/hearst/ -p " What do you guess these files are for? "
curated datasets being used:
- custom-instructions/
- curated-datasets/public/travel-food.md
- curated-datasets/public/employment-history.md
- curated-datasets/public/about.md
- curated-datasets/public/biography.md
- ../ragbot-private/curated-datasets/personal/accounts.md
- ../ragbot-private/curated-datasets/personal/contact-info.md
- ../ragbot-private/curated-datasets/personal/personal-family.md
- ../ragbot-private/curated-datasets/hearst/hearst.md
Using AI engine openai with model gpt-4
These files appear to be related to the curated-datasets of an AI system, likely for generating text or providing assistance based on the provided information. The files seem to be divided into two categories: public and private.
Public files:
- curated-datasets/public/travel-food.md: Rajiv's travel and food preferences
- curated-datasets/public/employment-history.md: Rajiv's employment history
- curated-datasets/public/about.md: General information about Rajiv
- curated-datasets/public/biography.md: Biography of Rajiv
Private files (stored in a separate private folder):
- curated-datasets/personal/accounts.md: Semi-private personal account information, such as frequent flyer numbers or loyalty programs. Does not contain any confidential or sensitive information.
- curated-datasets/personal/contact-info.md: Personal contact information, such as phone numbers and email addresses. Does not contain any confidential or sensitive information.
- curated-datasets/personal/personal-family.md: Personal and family information, such as family members and relationships. Does not contain any confidential or sensitive information.
Hearst-specific files:
- curated-datasets/hearst/hearst.md: Non-confidential, publicly available information related to the Hearst corporation, including Rajiv's role there
Overall, these files seem to contain various information about a person, their preferences, and professional background, likely used to tailor the AI system's responses and assistance.
rajivpant@RP-2021-MacBook-Pro ragbot % ถามคำถามทางเทคนิคเกี่ยวกับโครงการ
❗ในเวอร์ชันปัจจุบันของ ragbot.ai ตัวเลือก -stdin และ -prompt เป็นแบบพิเศษร่วมกันดังนั้นตัวอย่างต่อไปนี้จึงไม่ทำงานอีกต่อไป ในการอัปเดตในอนาคตของไฟล์ readme นี้ฉันจะให้ตัวอย่างอื่นเพื่อให้ได้ผลลัพธ์ที่คล้ายกัน
alexredmon@ar-macbook ~/s/scribe > cat docker-compose.yml | ragbot --stdin -p " which services will be exposed on which ports by running all services in the following docker-compose.yml file? "
In the given docker-compose.yml file, the following services are exposed on their respective ports:
1. "scribe" service: - Exposed on port 80 - Exposed on port 9009 (mapped to internal port 9009)
2. "scribe-feature" service: - Exposed on port 80
3. "scribe-redis" service: - Exposed on port 6379 (mapped to internal port 6379)
alexredmon@ar-macbook ~/s/scribe >การใช้เครื่องยนต์มานุษยวิทยากับ Claude Instant Model
rajivpant@RP-2021-MacBook-Pro ragbot % ./ragbot.py -e anthropic -m " claude-instant-v1 " -p " Tell me 5 fun things to do in NYC. "
No curated dataset files are being used.
Using AI engine anthropic with model claude-instant-v1
Here are 5 fun things to do in NYC:
1. Visit Central Park. Walk the paths, rent a paddle boat, visit the zoo, catch a Shakespeare in the Park performance.
2. Catch a Broadway show. New York is the center of the theater world with some of the greatest plays and musicals on Broadway and off Broadway.
3. Go to the top of the Empire State Building. Take in the panoramic views of all of NYC from one of its most famous landmarks.
4. Shop and dine in SoHo and the West Village. Explore trendy boutique shops and dig into meals at charming sidewalk cafes.
5. Take a free walking tour. There are numerous companies that offer guided walking tours of various NYC neighborhoods, covering history, culture, architecture and more.
rajivpant@RP-2021-MacBook-Pro ragbot % ความคิดสร้างสรรค์แบบสุ่ม
❗ในเวอร์ชันปัจจุบันของ ragbot.ai ตัวเลือก -stdin และ -prompt เป็นแบบพิเศษร่วมกันดังนั้นตัวอย่างต่อไปนี้ไม่ทำงานอีกต่อไป ในการอัปเดตในอนาคตของไฟล์ readme นี้ฉันจะให้ตัวอย่างอื่นเพื่อให้ได้ผลลัพธ์ที่คล้ายกัน
alexredmon@ar-macbook ~ > cat names.csv
rajiv,
jim,
dennis,
alexandria
alexredmon@ar-macbook ~ > catnames.csv | ragbot.py --stdin -p "Generate a creative nickname for each of the following people"
rajiv, Rajiv Razzle-Dazzle
jim, Jolly JimJam
dennis, Daring Denmaster
alexandria, All-Star Alexi
alexredmon@ar-macbook ~ >