6minutes Tech RAG
Post Date : 2025-08-16T21:34:58+07:00
Modified Date : 2025-08-16T21:34:58+07:00
Category: cheatsheet 6minutes-tech
Tags:
LLM
Let’s take a look at these 2 questions and how ChatGPT (LLM) answers those.
1st question: What is LLM ?
2nd question: What is our company onboarding process ?
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.
But in the 2nd question, ChatGPT can not answer your question, because there is no information about your company and its internal process.
So how do we support ChatGPT can answer this question?
You must provide it with context included your company’s internal process.
And that’s what we call RAG (retrieval augmented generation) - provide context for LLM to allow it provides more accurate answers.
Let’s build a prompt with context
You are an internal chatbox.
Your name is SChat
Your mission is to answer employee's questions.
You should find answers from the information I provided you.
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."
Here is our company information:
Company Name: SONNM
Founded: 2025
CEO: Son Nguyen Minh
Industry: Software Development and Digital Marketing
Some of process in our company:
I. Onboarding Process
1.1. Pre-boarding: This phase begins after a candidate accepts a job offer and continues until their first day. It involves tasks like:
Completing necessary paperwork (e.g., tax forms, benefit enrollment).
Setting up IT access and equipment.
Sending a welcome email and providing information about the first day.
Introducing the new hire to the team and culture.
1.2. Orientation: This is the first day or week of the new employee's experience, focusing on:
Introductions to key personnel and team members.
An overview of the company's structure, mission, and values.
A tour of the workspace.
Basic information about company policies and procedures.
1.3. Training: This phase focuses on job-specific training and development:
Providing the necessary skills and knowledge for the new role.
Introducing performance metrics and expectations.
Implementing a progressive training schedule.
Utilizing mentorship or buddy systems.
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.
And after we feed ChatGPT with context
Company information
Onboarding process
Unknown question
RAG
Common usecases:
- Provided enhanced context for internal informations
- Optimize enhanced context for large internal knowledge base
Provided enhanced context for internal informations
Optimize enhanced context for large internal knowledge base
Let’s say you have 10,000 products in your database. If you feed the LLM with the context of 10,000 products included details every conversation. It is not viable solution and the tokens for each question will be exploded, and you will be bankrupt immediately.
The main idea for an assistant chatbox like this is build your internal knowledge base, process the internal query from user question to find the relevant products and feed for the LLM. You should have process to retrieve necessary information from the customer to build the appropriated internal queries.