Advanced Technologies: Beyond Prompting -- Retrieval Augmented Generation(RAG)

RAG: giving it additional knowledge beyond what it may have learned from data on the Internet or other open sources

Retrieval Augmented Generation (RAG) example

  • General Chatbot
  • Chatbot with RAG
    • Give the LLM additional information
  1. Given a question, search relevant documents for answer (Company documents, most relevant to this question)
  2. Incorporate retrieved text into an updated prompt (take the relevant text from documentation and put that into my prompt;)
    1. limitations to the prompt length or the input length for a large language model
    2. Pull out just the part of the document that's most relevant to the question
  3. Generate answer from the new prompt with additional context
    1. generate an answer to this, but we're going to augment how we generate text by retrieving the relevant context or the relevant information and augmenting the prompt with that additional text
    2. also add a link to the original source document that led to this answer being generated
    3. can go back and read the original source document and double-check the answer for themseleves

Example of RAG applications

  • Chat with PDF files
    • upload pdf and then ask questions
    • use RAG to generate answers for you
  • Answer questions based on a website's articles
  • New form of web search

Big Idea: LLM as a reasoning engine: which is to think of the LLM not as a knowledge store, but instead as a reasoning engine

  • LLMs have a lot of general knowledge, but they don't know everything
  • By providing relevant context in the prompt, we ask an LLM to read a piece of text, then process it to get an answer
  • We're using it as a reasoning engine to process information, rather than using it as a source of information
相关推荐
冬奇Lab8 小时前
Workflow 系列(06):安全——跨步骤注入传播与四层防御
人工智能·工作流引擎
冬奇Lab8 小时前
每日一个开源项目(第149篇):RAG-Anything - 把图片、表格、公式当成一等公民的多模态 RAG 框架
人工智能·开源
米小虾9 小时前
AI Agent 安全实战指南:当智能体开始"不听话",开发者该如何应对?
人工智能·安全·agent
IT_陈寒10 小时前
Vite的热更新突然不香了,排查三小时差点砸键盘
前端·人工智能·后端
阿里云大数据AI技术12 小时前
构建高转化海外电商搜索:阿里云OpenSearch行业算法版的全链路智能优化策略实战
人工智能·搜索引擎
Awu122712 小时前
⚡从零开发 Agent CLI(五)实现一个可治理、可扩展的工具系统
前端·人工智能·claude
字节跳动视频云技术团队12 小时前
让 Agent 成为音视频工作台:AI MediaKit CLI + Skill 发布
人工智能·音视频开发
魏祖潇12 小时前
framework 整合实战——DDD/TDD/SDD 三件套在 framework 仓的真实落地
人工智能·后端
Token炼金师13 小时前
去噪扩散:从随机噪声到高保真图像的数学之路
人工智能·aigc