TroyDoesAI/Phi-3-Context-Obedient-RAG
TroyDoesAI/Phi-3-Context-Obedient-RAG is a fine-tuned model based on Microsoft's Phi-3-mini-128k-instruct, designed to improve adherence to provided context and reduce hallucinations in RAG applications. This model utilizes a specific, verbose prompt format with explicit delimiters to enhance its ability to associate responses with source documents. Its primary focus is to strengthen the 'R' in RAG by enabling more precise referencing of source details within generated answers.
Loading preview...
Overview
This model, TroyDoesAI/Phi-3-Context-Obedient-RAG, is a specialized fine-tune of Microsoft's Phi-3-mini-128k-instruct base model. Its core purpose is to significantly enhance context adherence and mitigate hallucinations, particularly within Retrieval Augmented Generation (RAG) workflows. The model achieves this through a unique, structured prompt format that explicitly delineates input blocks, associated context (metadata), and instructions.
Key Capabilities
- Enhanced Context Adherence: Designed to strictly follow the provided contextual information, reducing the generation of ungrounded responses.
- Reduced Hallucinations: By enforcing context obedience, the model aims to minimize instances where it generates information not present in the source material.
- Precise Source Referencing: The training dataset includes examples where the model is prompted to cite specific source details (e.g., date, URL) from the provided context in its responses, addressing a common weakness in RAG systems.
- Structured Prompting: Utilizes explicit delimiters (
BEGININPUT,BEGINCONTEXT,ENDCONTEXT,ENDINPUT,BEGININSTRUCTION,ENDINSTRUCTION) to clearly define different parts of the prompt, helping the model accurately locate and utilize information.
Good For
- RAG Applications: Ideal for scenarios where grounding responses in retrieved documents is critical.
- Fact-Checking & Verification: Useful for systems requiring verifiable answers linked directly to source material.
- Reducing AI Hallucinations: Aims to improve the trustworthiness of AI-generated content by ensuring it stays within the bounds of provided facts.
- Complex Information Retrieval: When dealing with multiple document chunks, this model can help attribute specific parts of the answer to the correct source.