jrgong seeks advice on efficiently using Slack chat history logs for an AI persona, considering cost and effectiveness. They present two options: directly copying logs into Discourse or pre-processing them. sam recommends processing the logs with a ‘Creative’ persona using a large context LLM like Sonnet 4, then uploading the processed files to a persona for RAG search. They advise against stuffing the system prompt with too much data, suggesting a 10k token limit for system prompts to keep costs manageable. jrgong clarifies the embedding process and token limits, and sam explains that uploaded files are processed via embedding and chunked, with relevant chunks injected into the prompt. jrgong confirms their next steps and sam emphasizes experimenting with different embedding models to improve results. jrgong expresses appreciation and offers to share their progress. Later, jrgong asks about adding version or model numbers to metadata separators, and sam confirms that using the same format for humans is acceptable.
שאלה מהירה, איזו מבנה “טוב יותר” למקרה השימוש שלנו:
יש לנו אוסף של יומני היסטוריית צ’אט מיוצאים מערוצי סלאק (Slack Channels) המכילים הרבה ידע, בעיות ופתרונות שהוזכרו וכו’. ברור שהצ’אטים האלה מכילים הרבה “רעש” חסר תועלת שיהיה לא כלכלי פשוט להכניס לנושאים/פוסטים ולגרום לבוט ה-AI להשתמש בו.
יש לנו כ-10 קבצים, כל אחד בגודל של כ-1-2MB. מבחינת שימוש באישיות AI, יהיו רק כ-30 אנשים שיבצעו כ-10 צ’אטים ביום (קשה להעריך את נפח הטוקנים כאן).
בשלב זה, אני תוהה מה תהיה גישת 80/20 סבירה כיצד להשתמש ביומני הצ’אט תוך שמירה על כלכליות מסוימת. זה ירד ל-2 אפשרויות:
העתק והדבק את היומנים לנושאים/פוסטים בדיסקרוס (Discourse): מהיר ומלוכלך, לא דורש פיתוח מותאם אישית, עלול להסתיים בהרבה עלויות API.
עיבוד מקדים כלשהו של יומני הצ’אט והכנסתם לפורמט או מבנה מתאים והעלאתם לאישיות.
או אולי סוג של היברידי: עם כל בקשה לבוט AI, הערכה ושמירה של הפלט כקובץ txt ואז העלאתו לאישיות.
איזו אפשרות אתם ממליצים? או אולי משהו שונה לחלוטין?
עיבוד 10 הקבצים באמצעות פרסונה “יצירתית” תוך שימוש ב-LLM גדול עם הקשר גדול / פלט גדול כמו Sonnet 4 thinking. המטרה של עיבוד זה תהיה “לסדר” את המידע ולהכין אותו ל-RAG.
לאחר מכן, באמצעות ההעלאה המובנית שלנו, העלה את 10 הקבצים המעובדים לפרסונה, כך ש-RAG יוכל לחפש בתוכן.
בהינתן שיש כאן המון נתונים, אני ממליץ להימנע מדחיסת הנחיית מערכת. ככלל אצבע, הנחיית מערכת לא אמורה להיות ארוכה מדי, זה הופך ליקר. 10k טוקנים זה עובד, 100k טוקנים זה לא עובד עם LLMs חזיתיים נוכחיים. כל אינטראקציה תעלה לך יותר מדי וה-LLMs יתבלבלו במיוחד.
Just to clarify, are all the uploaded files injected into the system prompt? Or are they processed through the configured ai_embeddings_model first and then injected?
I am a bit confused about your recommended 10k token limit recommendation especially with the part below:
The files in Discourse AI Persona, upload support are only limited by your upload size, they can be huge, they are processed via embedding, we inject chunks into the prompt per configuration.
What I was talking about was trying to coerce all the information into a single system prompt here:
אז בעצם, הצעדים הבאים שלי צריכים להיות הרצת כמה בדיקות עם מודלים שונים של הטמעות (embeddings) ולראות איזה גודל טוקנים אני בסופו של דבר מזריק למערכת ההנחיה (system prompt), נכון?
The embedding model controls quality, not quantity
you can roll up all your data into a single file, we will chunk it in the background and retrieve the most relevant chunks and add the to your prompt
experimenting here would be about improving results, some cleanup may work better than others clean ups some embedding models will be smarter at finding more relevant pieces
[[metadata about cats]]
a long story about cats
[[metadata about dogs]]
a long story about dogs
Now if we want to enrich them with version numbers or specific model numbers, do I just use the same format or structure that humans would use when typing them?
E.g.:
[[metadata about cats v1.0]]
a long story about cats
[[metadata about dogs]]
a long story about dogs
[[metadata about cats xxl v2.1]]
a long story about cats
[[metadata about dogs v 1.1beta]]
a long story about dogs
Also, when version numbers are missing in metadata (see metadata about dogs), would that chunk be used in a response for all dog-related requests, no matter which “dog version”?