# 针对长上下文LLMs的提示注入作为RAG的替代方案？

**URL:** <https://meta.discourse.org/t/prompt-injection-for-long-context-llms-as-an-alternative-to-rag/309086>\
**Category:** Support\
**Tags:** ai, ai-bot\
**Created:** [2024年五月22日 22:47 UTC](https://meta.discourse.org/t/prompt-injection-for-long-context-llms-as-an-alternative-to-rag/309086 "2024-05-22T22:47:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2024年五月23日 02:58 UTC](https://meta.discourse.org/t/prompt-injection-for-long-context-llms-as-an-alternative-to-rag/309086/2 "2024-05-23T02:58:18Z")

</div>

> [@StevePlex](#):
>
> 通过系统提示将中等大小的文档（例如，高达 100KB）注入 Discourse AI 机器人会话的上下文是否可行？

是的，我们有依赖于 LLM 允许的令牌数量的截断逻辑，我们将 Gemini 1.5 模型的阈值设置得很高（800k）。

应该可行，但每次交互的成本可能非常高。

总的来说，我发现限制上下文有助于模型保持更专注，但从长远来看（2-5 年后）……检索增强生成（RAG）可能变得毫无意义，因为我们将拥有如此多的令牌和焦点，以至于它不再重要。

---

_[View the full topic](https://meta.discourse.org/t/prompt-injection-for-long-context-llms-as-an-alternative-to-rag/309086)._
