请问HN:如何开始使用RAG?
在我的工作中,我目前正在将代码连接到大型语言模型(LLM)的API上。其实只需要一些Python和常识。在我的脚本中,LLM可以访问某些Python脚本,这些脚本调用特定的API以获取更多数据,然后我将这些数据放回提示中,以便LLM能够进行推理(这些数据简单到LLM能够处理)。
我注意到有一些项目正在出现,人们希望建立一个“知识库”。在我看来,这听起来像是他们需要检索增强生成(RAG),因为这涉及到更多的数据,而你不能再简单地将这些数据放入提示/上下文中。不过,我对这方面的了解并不多,除了基本的原则。
那么,我该如何开始学习如何使用RAG扩展这样的系统呢?
查看原文
At my job I'm currently hooking up code to the APIs of LLMs. Just some Python and some common sense, really. In my scripts, the LLMs have access to certain Python scripts that call certain APIs to get more data and I put that back into the prompt so it can reason on it (the data is simple enough for an LLM to be able to do that).<p>And I've noticed there are some projects coming up where people want a "knowledge base". That to me sounds like they need RAG as that's a lot more data and you can't just put that into the prompt/context anymore. But I don't really know much about it other than some basic principles.<p>So how do I get started on learning how to extend such a system with RAG?