Table of Contents

👉 Try the demo: https://github.com/LM-Kit/lm-kit-net-samples/tree/main/console_net/document-intelligence/document-rag/folder_chat_with_citations

Document RAG for C# .NET Applications


🎯 Purpose of the Demo

Index every PDF / TXT / DOCX / HTML / EML in a folder, then open a RagChat and ask grounded questions with citations.

✨ Key Features

  • RagEngine.ImportTextFromFile(path, encoding, dataSourceId, sectionId) for batch indexing.
  • RagChat(engine, chatModel) for the conversational loop.
  • RagChat.QueryGenerationMode = QueryGenerationMode.Contextual for follow-up rephrasing.
  • RagQueryResult.RetrievedPartitions for citation rendering.

⚙️ Getting Started

cd lm-kit-net-samples/console_net/document-intelligence/document-rag/folder_chat_with_citations
dotnet run -- C:\docs\policies

📚 Additional Resources

Share