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
相关推荐
汤姆宝库7 小时前
蒸馏的三层实现:logits级、序列级与数据级
人工智能·深度学习·机器学习
云半S一7 小时前
Agent学习总结补充:2
人工智能·经验分享·笔记·agent·学习分享
wflynn8 小时前
Inkling 2 Mini:26B 参数循环 Transformer 的本地多模态模型
人工智能·ai
hryou09229 小时前
模型已经会欺骗评估员?24人爆料,OpenAI为何考虑停训
人工智能·ai编程
Csvn9 小时前
Agent 能调工具那天,权限就该已经修好了——最小权限 + 人工确认(S03)
人工智能·aigc·agent
Eyfcom9 小时前
〖物流低代码实战 06〗AI 生成 Schema 的工程边界:大模型能否直接接管快递软件的页面搭建?
人工智能·低代码·快递软件·物流低代码实战
甲维斯9 小时前
GLM5.4和GPT6.1赛马,搞定超级玛丽32关!
人工智能
qyr67899 小时前
全球汽车和航空航天用磁铁材料市场竞争格局变化趋势
大数据·人工智能·物联网·自动化·汽车和航空航天用磁铁材料
ZONGYUAN-ROOT10 小时前
【开源发布】约束运行时(Constraint Runtime)开源发布:给智能体规模化部署加四层护栏
人工智能·开源