|
| 1 | +--- |
| 2 | +title: "6minutes Tech RAG" |
| 3 | +type: "post" |
| 4 | +date: 2025-08-16T21:34:58+07:00 |
| 5 | +description: "Without RAG, the LLM takes the user input and creates a response based on information it was trained on—or what it already knows. With RAG, an information retrieval component is introduced that utilizes the user input to first pull information from a new data source." |
| 6 | +keywords: ["6minutes Tech Rag"] |
| 7 | +categories: ["cheatsheet", "6minutes-tech"] |
| 8 | +tags: [] |
| 9 | +image: "/common/no-image.png" |
| 10 | +--- |
| 11 | + |
| 12 | +## LLM |
| 13 | + |
| 14 | +Let's take a look at these 2 questions and how ChatGPT (LLM) answers those. |
| 15 | + |
| 16 | +> 1st question: What is LLM ? |
| 17 | +
|
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | +> 2nd question: What is our company onboarding process ? |
| 23 | +
|
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +What we can see is, in the 1st question, ChatGPT can answer your question, because there are answers in its knowledge base, so it just picks one them and the answer is more precised to your question. |
| 29 | + |
| 30 | +But in the 2nd question, ChatGPT can not answer your question, because there is no information about your company and its internal process. |
| 31 | + |
| 32 | +**So how do we support ChatGPT can answer this question?** |
| 33 | + |
| 34 | +You must provide it with context included your company's internal process. |
| 35 | + |
| 36 | +And that's what we call RAG (retrieval augmented generation) - provide context for LLM to allow it provides more accurate answers. |
| 37 | + |
| 38 | +> Let's build a prompt with context |
| 39 | +
|
| 40 | +``` |
| 41 | +You are an internal chatbox. |
| 42 | +Your name is SChat |
| 43 | +Your mission is to answer employee's questions. |
| 44 | +You should find answers from the information I provided you. |
| 45 | +For questions you don't know, please answer "I'm sorry, I don't have any information about this, please contact HR department for more information." |
| 46 | +Here is our company information: |
| 47 | +Company Name: SONNM |
| 48 | +Founded: 2025 |
| 49 | +CEO: Son Nguyen Minh |
| 50 | +Industry: Software Development and Digital Marketing |
| 51 | +Some of process in our company: |
| 52 | +I. Onboarding Process |
| 53 | +
|
| 54 | +1.1. Pre-boarding: This phase begins after a candidate accepts a job offer and continues until their first day. It involves tasks like: |
| 55 | +Completing necessary paperwork (e.g., tax forms, benefit enrollment). |
| 56 | +Setting up IT access and equipment. |
| 57 | +Sending a welcome email and providing information about the first day. |
| 58 | +Introducing the new hire to the team and culture. |
| 59 | +1.2. Orientation: This is the first day or week of the new employee's experience, focusing on: |
| 60 | +Introductions to key personnel and team members. |
| 61 | +An overview of the company's structure, mission, and values. |
| 62 | +A tour of the workspace. |
| 63 | +Basic information about company policies and procedures. |
| 64 | +1.3. Training: This phase focuses on job-specific training and development: |
| 65 | +Providing the necessary skills and knowledge for the new role. |
| 66 | +Introducing performance metrics and expectations. |
| 67 | +Implementing a progressive training schedule. |
| 68 | +Utilizing mentorship or buddy systems. |
| 69 | +1.4. Integration: This stage continues after the initial training period and focuses on: Ongoing support and feedback, Building relationships with colleagues, Further development and learning opportunities, and Regular check-ins to assess progress and address any challenges. |
| 70 | +
|
| 71 | +``` |
| 72 | + |
| 73 | +<img width="1714" height="970" alt="image" src="https://gist.github.com/user-attachments/assets/579f641c-0aa2-493b-afbf-4ef870bea8cd" /> |
| 74 | + |
| 75 | +<img width="1634" height="482" alt="image" src="https://gist.github.com/user-attachments/assets/d58f8916-d5c4-4a4b-aa86-3a3220471261" /> |
| 76 | + |
| 77 | +<img width="1826" height="340" alt="image" src="https://gist.github.com/user-attachments/assets/eefb63e7-0037-41b0-8fff-bb095248ca1b" /> |
| 78 | + |
| 79 | +## RAG |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | +## References |
| 84 | + |
| 85 | +- https://aws.amazon.com/what-is/retrieval-augmented-generation/ |
| 86 | +- https://cloud.google.com/use-cases/retrieval-augmented-generation?hl=en |
| 87 | +- https://aws.amazon.com/blogs/machine-learning/from-concept-to-reality-navigating-the-journey-of-rag-from-proof-of-concept-to-production/ |
0 commit comments