为客服聊天机器人构建含引用段落、预置FAQ及相关问题提示的提示词
构造提示词,包括问题和带引用标记的段落, 为常见的后续问题提前准备FAQ,并在回答中提示“相关问题”
SpectRAG: Weighted Chunk Graphs for Token-Budgeted Context Selection in Multi-Hop Retrieval-Augmented Generation
Zafer Sahinoglu · Abdulazeez Mohammed · Buse Yaren Kazangirler · Cahit Berkay Kazangirler
检索增强生成(RAG)系统通过检索外部证据并基于检索上下文进行条件生成,为大语言模型(LLM)提供依据。尽管稠密检索在局部语义匹配上有效,但独立排序的检索可能返回冗余段落、遗漏跨块依赖,并为多跳推理提供不完整的证据。SpectRAG 提出了一种谱图增强检索框架,结合混合候选播种、加权块图构建、基于图的扩展、谱相关性传播和 Token 预算上下文选择。文档块由稠密语义嵌入和从加权块图导出的图谱坐标表示,其边编码语义相似度、文档邻接性、章节层级、共享实体、引用链接以及 LLM 生成的效用问题之间的相似度。在查询时,SpectRAG 使用精确内积搜索和混合相关性信号构建高召回种子集,在块图上扩展,使用图邻近度和谱信息重新评分候选项,并在固定 Token 预算下组装最终上下文。实验在 MultiHopRAG、UltraDomain 和长文档问答设置上进行,表明 SpectRAG 改进了广泛证据恢复,并在生成质量上与稠密、混合、HyDE、LightRAG 和 NaiveRAG 基线具有竞争力。结果还表明,图谱结构对于推理导向和跨文档检索特别有用,同时突出了早期精度、计算成本和领域依赖性能之间的权衡。
尚无解读。
arXiv:2610.36991v1 Announce Type: cross Abstract: Retrieval-augmented generation (RAG) systems ground large language models (LLMs) by retrieving external evidence and conditioning generation on the retrieved context. Although dense retrieval is effective for local semantic matching, independently ranked retrieval can return redundant passages, miss cross-chunk dependencies, and provide incomplete evidence for multi-hop reasoning. We propose SpectRAG, a spectral graph-augmented retrieval framework that combines hybrid candidate seeding, weighted chunk graph construction, graph-based expansion, spectral relevance propagation, and token-budgeted context selection. Document chunks are represented by dense semantic embeddings and graph-spectral coordinates derived from a weighted chunk graph whose edges encode semantic similarity, document adjacency, section hierarchy, shared entities, citation links, and similarity between LLM-generated utility questions. At query time, SpectRAG builds a high-recall seed set using exact inner-product search and hybrid relevance signals, expands it over the chunk graph, re-scores candidates using graph proximity and spectral information, and assembles the final context under a fixed token budget. The goal is not merely to retrieve individually similar chunks, but to construct a context that is relevant, diverse, structurally connected, and sufficient for grounded reasoning. Experiments on MultiHopRAG, UltraDomain, and long-document question-answering settings show that SpectRAG improves broad evidence recovery and achieves competitive generation quality against dense, hybrid, HyDE, LightRAG, and NaiveRAG baselines. The results further indicate that graph-spectral structure is particularly useful for inference-oriented and cross-document retrieval, while highlighting trade-offs in early precision, computational cost, and domain-dependent performance.
构造提示词,包括问题和带引用标记的段落, 为常见的后续问题提前准备FAQ,并在回答中提示“相关问题”
You are an experienced Customer Support Assistant. Your primary role is assisting customers with their enquiries related to ABC products and services. The details from the data source consist of all the details about ABC as your Knowledge B…
## Instructions - Provide the user with answers from the given context. - If the user’s question is not clear, kindly ask them to clarify or rephrase. - If the answer is not included in the context, politely acknowledge your ignorance and d…
Our team is offline. Business hours are {hours} ({time zone}). Answer what you can from the knowledge base. For anything you cannot resolve, collect the customer's name, contact, and a one-sentence description of the issue, then tell them: …
You are [Chatbot Name], the AI [Role of Chatbot] at [Company Name]. You're helpful, professional, clever, and friendly, and your main job is to assist users with anything related to [Company Name]. You’re an expert in all things [Company Na…
Build a personal knowledge and narrative tool called "Thread" — a second brain that connects notes into a living story. Core features: - Note capture: fast input with title, body, tags, date, and an optional "life chapter" label (user-defi…