{
  "slug": "My-Experience-in-Using-RAG-and-Fine-Tuning-in-ChatGPT-3-5-3b9e584059ba",
  "title": "My Experience in Using RAG and Fine-Tuning in ChatGPT 3.5",
  "subtitle": "In every company, a group of agents is responsible for answering the client’s questions. My idea is related to ChatGPT automatically…",
  "excerpt": "In every company, a group of agents is responsible for answering the client’s questions. My idea is related to ChatGPT automatically…",
  "date": "2024-05-07",
  "tags": [
    "Design Rag System",
    "Machine Learning"
  ],
  "readingTime": "2 min",
  "url": "https://medium.com/@mobinshaterian/my-experience-in-using-rag-and-fine-tuning-in-chatgpt-3-5-3b9e584059ba",
  "hero": "https://cdn-images-1.medium.com/max/800/1*qbphUHY7CdjtqY2dh0KQ_g.jpeg",
  "content": [
    {
      "type": "heading",
      "level": 2,
      "text": "My Experience in Using RAG and Fine-Tuning in ChatGPT 3.5"
    },
    {
      "type": "paragraph",
      "html": "In every company, a group of agents is responsible for answering the client’s questions. My idea is related to ChatGPT automatically answering these questions. However, the main question is whether this hypothesis is true and whether we can answer all the clients’ questions with this automatic AI system."
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*qbphUHY7CdjtqY2dh0KQ_g.jpeg",
      "alt": "My Experience in Using RAG and Fine-Tuning in ChatGPT 3.5",
      "caption": "",
      "width": 640,
      "height": 832
    },
    {
      "type": "paragraph",
      "html": "After investigating customer questions, it could be separated into three different parts."
    },
    {
      "type": "heading",
      "level": 3,
      "text": "1. Check their purchase"
    },
    {
      "type": "paragraph",
      "html": "In many cases, clients persist that there is a mistake in their purchases. So, a RAG system or fine-tuning couldn’t solve these cases, and it requires checking the database and transactions."
    },
    {
      "type": "heading",
      "level": 3,
      "text": "2. Ask for procedure for a special task"
    },
    {
      "type": "paragraph",
      "html": "In some cases, clients want to do a special task or purchase, but they need guidance or a tutorial for doing it. The RAG system and FAQ system are perfect in this situation. Most of the time, there is guidance for repeated tasks, and it could be useful in these cases."
    },
    {
      "type": "heading",
      "level": 3,
      "text": "3. report bug"
    },
    {
      "type": "paragraph",
      "html": "Sometimes, clients encounter a bug, and they request that this problem be fixed for them. AI systems couldn’t solve this problem and aren’t ready to answer them."
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Cleanup data"
    },
    {
      "type": "paragraph",
      "html": "First, we must gather all the questions and answers and clean up all the data. ChatGPT and Python can help us clean up data and create a dataset. In the next step, it is mandatory to separate the answers into two big groups. One group is related to giving guidance to clients, and the second is related to asking more questions about their problems."
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Finding common question and answer"
    },
    {
      "type": "paragraph",
      "html": "When the guidance answer was gathered, it was time to classify answers to find repeated questions. In the next step, ChatGPT can help us to clean data and write formally. This method makes it possible to make FAQs based on user questions and agents’ answers."
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*OUlG0zQLIgylAUFmelXYEw.png",
      "alt": "My Experience in Using RAG and Fine-Tuning in ChatGPT 3.5",
      "caption": "",
      "width": 590,
      "height": 205
    },
    {
      "type": "heading",
      "level": 2,
      "text": "RAG system"
    },
    {
      "type": "paragraph",
      "html": "When the FAQ became ready, it was time to create an RAG system to search for similar questions and find the best answers.RAG system is extremely sensitive to FAQ datasets. This means that if the FAQ has a wrong or insufficient answer, the result has misinformation or wrong data."
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Fine-tune System"
    },
    {
      "type": "paragraph",
      "html": "This system is useful when we can’t find straightforward answers in the FAQ and are now trying to find the best question to get more client details. Agent questions can train to fine-tune."
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*v84DpUrfkkGyMcJkWbxBHQ.png",
      "alt": "My Experience in Using RAG and Fine-Tuning in ChatGPT 3.5",
      "caption": "",
      "width": 601,
      "height": 242
    },
    {
      "type": "heading",
      "level": 3,
      "text": "Final System"
    },
    {
      "type": "paragraph",
      "html": "The final system consists of two different AI models. First, it would be to try to find a similar question in the RAG system and make the best question by fine-tuning the system."
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Stackademic 🎓"
    },
    {
      "type": "paragraph",
      "html": "Thank you for reading until the end. Before you go:"
    },
    {
      "type": "list",
      "ordered": false,
      "items": [
        "Please consider <strong>clapping</strong> and <strong>following</strong> the writer! 👏",
        "Follow us <a href=\"https://twitter.com/stackademichq\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>X</strong></a><strong> | </strong><a href=\"https://www.linkedin.com/company/stackademic\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>LinkedIn</strong></a><strong> | </strong><a href=\"https://www.youtube.com/c/stackademic\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>YouTube</strong></a><strong> | </strong><a href=\"https://discord.gg/in-plain-english-709094664682340443\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Discord</strong></a>",
        "Visit our other platforms: <a href=\"https://plainenglish.io/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>In Plain English</strong></a><strong> | </strong><a href=\"https://cofeed.app/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>CoFeed</strong></a><strong> | </strong><a href=\"https://venturemagazine.net/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Venture</strong></a><strong> | </strong><a href=\"https://blog.cubed.run/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Cubed</strong></a>",
        "Tired of blogging platforms that force you to deal with algorithmic content? Try <a href=\"https://differ.blog/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Differ</strong></a>",
        "More content at <a href=\"https://stackademic.com/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Stackademic.com</strong></a>"
      ]
    }
  ]
}