AgenticAI.ContextEngineering
1.0.4
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package AgenticAI.ContextEngineering --version 1.0.4
NuGet\Install-Package AgenticAI.ContextEngineering -Version 1.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AgenticAI.ContextEngineering" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AgenticAI.ContextEngineering" Version="1.0.4" />
<PackageReference Include="AgenticAI.ContextEngineering" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AgenticAI.ContextEngineering --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AgenticAI.ContextEngineering, 1.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AgenticAI.ContextEngineering@1.0.4
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AgenticAI.ContextEngineering&version=1.0.4
#tool nuget:?package=AgenticAI.ContextEngineering&version=1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
🚀 SmartChatBot.ContextEngineering
Complete Context Engineering Library for AI/LLM Applications
📖 Table of Contents
- Overview
- Features
- Installation
- Quick Start
- Core Concepts
- Architecture
- API Reference
- Usage Examples
- Configuration
- Advanced Features
- Performance
- Contributing
- License
📋 Overview
SmartChatBot.ContextEngineering is a production-ready .NET 9 library that implements advanced context engineering patterns for AI/LLM applications. It provides intelligent context compression, hybrid search, document processing, and memory management to reduce token usage by up to 90%+ while preserving semantic relevance.
Why Context Engineering?
| Problem | Solution |
|---|---|
| 💸 High API Costs | Reduce tokens by 90%+ with intelligent compression |
| 🐌 Slow Response Times | Sub-100ms query processing with optimized indexing |
| 📚 Large Codebases | AST-based chunking and semantic retrieval |
| 🔍 Poor Search Results | Hybrid search combining lexical + semantic (RRF) |
| 💾 Memory Management | Append-only memory with long-term persistence |
✨ Features
Core Features
| Feature | Description | Status |
|---|---|---|
| Context Compression | Reduce tokens by 90%+ with tiered compression | ✅ |
| Hybrid Search | BM25 + Vector search with Reciprocal Rank Fusion | ✅ |
| Document Processing | Upload, chunk, embed, and index documents | ✅ |
| Embedding Generation | Multiple backends (Azure OpenAI, Mock, Hash) | ✅ |
| Memory Management | Short-term and long-term memory systems | ✅ |
| LLM-as-Judge | Automated response quality evaluation | ✅ |
Search Types
| Search Type | Algorithm | Best For |
|---|---|---|
| Lexical | BM25 / TF-IDF | Exact keyword matching |
| Semantic | Vector Similarity | Understanding user intent |
| Hybrid | RRF (Reciprocal Rank Fusion) | Best of both worlds |
Compression Tiers
| Tier | Strategy | Type | Reduction |
|---|---|---|---|
| 1 | Offload | Lossless | 10-20% |
| 2 | Algorithmic | Fast | 30-50% |
| 3 | LLM Summarization | Lossy | 60-80% |
| 4 | Emergency Truncation | Aggressive | 80-95% |
📦 Installation
NuGet Package Manager
dotnet add package SmartChatBot.ContextEngineering
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Azure.AI.OpenAI (>= 2.1.0)
- Microsoft.Extensions.Caching.Memory (>= 9.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
- TiktokenSharp (>= 1.2.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on AgenticAI.ContextEngineering:
| Package | Downloads |
|---|---|
|
AgenticAI.ContextEngineering.Demo
Package Description |
|
|
SmartChatBot.ContextEngineering.Demo
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.