adaptive-intelligence 4.0.1__tar.gz → 4.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/PKG-INFO +27 -15
  2. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/README.md +26 -14
  3. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/__init__.py +1 -1
  4. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence.egg-info/PKG-INFO +27 -15
  5. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/pyproject.toml +2 -2
  6. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/LICENSE +0 -0
  7. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/agentic/__init__.py +0 -0
  8. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/context/__init__.py +0 -0
  9. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/core/__init__.py +0 -0
  10. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/core/config.py +0 -0
  11. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/core/engine.py +0 -0
  12. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/core/response.py +0 -0
  13. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/evaluation/__init__.py +0 -0
  14. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/graph/__init__.py +0 -0
  15. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/indexes/__init__.py +0 -0
  16. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/indexes/base.py +0 -0
  17. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/indexes/keyword_index.py +0 -0
  18. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/indexes/page_index.py +0 -0
  19. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/indexes/vector_index.py +0 -0
  20. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/ingestion/__init__.py +0 -0
  21. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/ingestion/chunker.py +0 -0
  22. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/ingestion/engine.py +0 -0
  23. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/ingestion/parser.py +0 -0
  24. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/llm/__init__.py +0 -0
  25. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/mcp/__init__.py +0 -0
  26. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/memory/__init__.py +0 -0
  27. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/memory/persistent.py +0 -0
  28. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/prompts/__init__.py +0 -0
  29. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/query/__init__.py +0 -0
  30. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/rl/__init__.py +0 -0
  31. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/rl/multi_query.py +0 -0
  32. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/rl/ppo.py +0 -0
  33. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/rl/pretrained.py +0 -0
  34. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/rl/reranker.py +0 -0
  35. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/security/__init__.py +0 -0
  36. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence/utils/__init__.py +0 -0
  37. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence.egg-info/SOURCES.txt +0 -0
  38. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence.egg-info/dependency_links.txt +0 -0
  39. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence.egg-info/requires.txt +0 -0
  40. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/adaptive_intelligence.egg-info/top_level.txt +0 -0
  41. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/setup.cfg +0 -0
  42. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/tests/test_core.py +0 -0
  43. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/tests/test_evaluation.py +0 -0
  44. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/tests/test_graph.py +0 -0
  45. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/tests/test_ingestion.py +0 -0
  46. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/tests/test_query.py +0 -0
  47. {adaptive_intelligence-4.0.1 → adaptive_intelligence-4.0.3}/tests/test_rl.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adaptive-intelligence
3
- Version: 4.0.1
3
+ Version: 4.0.3
4
4
  Summary: Self-improving retrieval framework with RL routing, context engineering, MCP integration, agentic workflow, and persistent memory.
5
5
  Author-email: Venkatkumar Rajan <venkatkumarr.vk99@gmail.com>
6
6
  License: Apache-2.0
@@ -70,7 +70,7 @@ Dynamic: license-file
70
70
 
71
71
  <div align="center">
72
72
 
73
- <img src="docs/images/image_ai.png" alt="adaptive-intelligence" width="100%">
73
+ <img src="https://raw.githubusercontent.com/VK-Ant/adaptive-intelligence/main/docs/images/image_ai.png" alt="adaptive-intelligence" width="100%">
74
74
 
75
75
  # adaptive-intelligence
76
76
 
@@ -283,40 +283,52 @@ python demo_mcp_client.py # Connect to MCP server (terminal 2)
283
283
 
284
284
  ## FAQ
285
285
 
286
- **Does it work without an LLM?**
286
+ **1. Does it work without an LLM?**
287
+
287
288
  Yes. Set `llm_backend="none"` and the system returns relevant document excerpts. RL routing, graph activation, memory, and evaluation all work without an LLM.
288
289
 
289
- **Does it work without a vector database?**
290
+ **2. Does it work without a vector database?**
291
+
290
292
  Yes. Set `vectorless=True` for page-level BM25 search with zero dependencies. Same RL routing, same graph, same learning.
291
293
 
292
- **How many queries before it starts learning?**
294
+ **3. How many queries before it starts learning?**
295
+
293
296
  Default warmup is 15 queries. During warmup, the system uses smart heuristic defaults while collecting RL statistics. After 15 queries, the learned policy takes over. Use `pretrained_policy=True` to skip warmup entirely.
294
297
 
295
- **Which retrieval strategies does the RL choose from?**
298
+ **4. Which retrieval strategies does the RL choose from?**
299
+
296
300
  Six routes: keyword only, vector only, hybrid (keyword + vector with RRF), table first, graph first, and graph hybrid. The RL also selects retrieval depth and whether to activate the knowledge graph.
297
301
 
298
- **How is the knowledge graph built?**
302
+ **5. How is the knowledge graph built?**
303
+
299
304
  Automatically during document ingestion from entity co-occurrences. No manual setup. A 5-signal gate decides per-query whether to activate graph traversal.
300
305
 
301
- **What is context engineering?**
306
+ **6. What is context engineering?**
307
+
302
308
  Instead of just stuffing retrieved chunks into a prompt, context engineering optimizes the entire context window — system prompt, memory entries, conversation history, tool results, and chunks — with token budget allocation per component.
303
309
 
304
- **How does agentic mode work?**
310
+ **7. How does agentic mode work?**
311
+
305
312
  The system retrieves, evaluates confidence, and if it's below threshold, refines the query and retrieves again. It can also call registered tools between rounds. Maximum 3 rounds by default.
306
313
 
307
- **Can I add documents after initial ingestion?**
314
+ **8. Can I add documents after initial ingestion?**
315
+
308
316
  Yes. Call `engine.ingest()` again with new documents. The RL policy, knowledge graph, and memory all continue from their current state. No restart needed.
309
317
 
310
- **What about latency?**
318
+ **9. What about latency?**
319
+
311
320
  The system adds approximately 100-150ms overhead per query (classification, RL decision, evaluation, policy update). The LLM call typically takes 500-3000ms. Overhead is roughly 5-10% of total response time.
312
321
 
313
- **How does it save cost?**
322
+ **10. How does it save cost?**
323
+
314
324
  The RL learns optimal retrieval depth per query type. Factual queries get depth 2 (2 chunks), complex queries get depth 8. Fewer chunks = fewer tokens = lower LLM cost. The RL also learns which tools to skip, reducing unnecessary API calls.
315
325
 
316
- **Is it production-ready?**
326
+ **11. Is it production-ready?**
327
+
317
328
  The library has 99 tests, crash recovery with auto-checkpoint, and graceful shutdown. BM25 is in-memory which works for hundreds of documents. For 50K+ documents, a disk-backed index is planned.
318
329
 
319
- **How is this different from LangChain or LlamaIndex?**
330
+ **12. How is this different from LangChain or LlamaIndex?**
331
+
320
332
  Those are orchestration frameworks with static pipelines. You configure the retrieval strategy once. adaptive-intelligence learns the optimal strategy per query type through reinforcement learning. The system improves with every query answered.
321
333
 
322
334
  ## Version History
@@ -375,7 +387,7 @@ Contributions are welcome.
375
387
 
376
388
  ## Also by me
377
389
 
378
- [**llmevalkit**](https://pypi.org/project/llmevalkit/) — 61 metrics for LLM evaluation with HIPAA, GDPR, DPDP, and EU AI Act compliance modules.
390
+ [**llmevalkit**](https://pypi.org/project/llmevalkit/) — 78 metrics for LLM evaluation with HIPAA, GDPR, DPDP, and EU AI Act compliance modules.
379
391
 
380
392
  adaptive-intelligence was born from llmevalkit. If you can measure LLM quality (llmevalkit), you can use those measurements as a reward signal to improve retrieval (adaptive-intelligence).
381
393
 
@@ -1,6 +1,6 @@
1
1
  <div align="center">
2
2
 
3
- <img src="docs/images/image_ai.png" alt="adaptive-intelligence" width="100%">
3
+ <img src="https://raw.githubusercontent.com/VK-Ant/adaptive-intelligence/main/docs/images/image_ai.png" alt="adaptive-intelligence" width="100%">
4
4
 
5
5
  # adaptive-intelligence
6
6
 
@@ -213,40 +213,52 @@ python demo_mcp_client.py # Connect to MCP server (terminal 2)
213
213
 
214
214
  ## FAQ
215
215
 
216
- **Does it work without an LLM?**
216
+ **1. Does it work without an LLM?**
217
+
217
218
  Yes. Set `llm_backend="none"` and the system returns relevant document excerpts. RL routing, graph activation, memory, and evaluation all work without an LLM.
218
219
 
219
- **Does it work without a vector database?**
220
+ **2. Does it work without a vector database?**
221
+
220
222
  Yes. Set `vectorless=True` for page-level BM25 search with zero dependencies. Same RL routing, same graph, same learning.
221
223
 
222
- **How many queries before it starts learning?**
224
+ **3. How many queries before it starts learning?**
225
+
223
226
  Default warmup is 15 queries. During warmup, the system uses smart heuristic defaults while collecting RL statistics. After 15 queries, the learned policy takes over. Use `pretrained_policy=True` to skip warmup entirely.
224
227
 
225
- **Which retrieval strategies does the RL choose from?**
228
+ **4. Which retrieval strategies does the RL choose from?**
229
+
226
230
  Six routes: keyword only, vector only, hybrid (keyword + vector with RRF), table first, graph first, and graph hybrid. The RL also selects retrieval depth and whether to activate the knowledge graph.
227
231
 
228
- **How is the knowledge graph built?**
232
+ **5. How is the knowledge graph built?**
233
+
229
234
  Automatically during document ingestion from entity co-occurrences. No manual setup. A 5-signal gate decides per-query whether to activate graph traversal.
230
235
 
231
- **What is context engineering?**
236
+ **6. What is context engineering?**
237
+
232
238
  Instead of just stuffing retrieved chunks into a prompt, context engineering optimizes the entire context window — system prompt, memory entries, conversation history, tool results, and chunks — with token budget allocation per component.
233
239
 
234
- **How does agentic mode work?**
240
+ **7. How does agentic mode work?**
241
+
235
242
  The system retrieves, evaluates confidence, and if it's below threshold, refines the query and retrieves again. It can also call registered tools between rounds. Maximum 3 rounds by default.
236
243
 
237
- **Can I add documents after initial ingestion?**
244
+ **8. Can I add documents after initial ingestion?**
245
+
238
246
  Yes. Call `engine.ingest()` again with new documents. The RL policy, knowledge graph, and memory all continue from their current state. No restart needed.
239
247
 
240
- **What about latency?**
248
+ **9. What about latency?**
249
+
241
250
  The system adds approximately 100-150ms overhead per query (classification, RL decision, evaluation, policy update). The LLM call typically takes 500-3000ms. Overhead is roughly 5-10% of total response time.
242
251
 
243
- **How does it save cost?**
252
+ **10. How does it save cost?**
253
+
244
254
  The RL learns optimal retrieval depth per query type. Factual queries get depth 2 (2 chunks), complex queries get depth 8. Fewer chunks = fewer tokens = lower LLM cost. The RL also learns which tools to skip, reducing unnecessary API calls.
245
255
 
246
- **Is it production-ready?**
256
+ **11. Is it production-ready?**
257
+
247
258
  The library has 99 tests, crash recovery with auto-checkpoint, and graceful shutdown. BM25 is in-memory which works for hundreds of documents. For 50K+ documents, a disk-backed index is planned.
248
259
 
249
- **How is this different from LangChain or LlamaIndex?**
260
+ **12. How is this different from LangChain or LlamaIndex?**
261
+
250
262
  Those are orchestration frameworks with static pipelines. You configure the retrieval strategy once. adaptive-intelligence learns the optimal strategy per query type through reinforcement learning. The system improves with every query answered.
251
263
 
252
264
  ## Version History
@@ -305,7 +317,7 @@ Contributions are welcome.
305
317
 
306
318
  ## Also by me
307
319
 
308
- [**llmevalkit**](https://pypi.org/project/llmevalkit/) — 61 metrics for LLM evaluation with HIPAA, GDPR, DPDP, and EU AI Act compliance modules.
320
+ [**llmevalkit**](https://pypi.org/project/llmevalkit/) — 78 metrics for LLM evaluation with HIPAA, GDPR, DPDP, and EU AI Act compliance modules.
309
321
 
310
322
  adaptive-intelligence was born from llmevalkit. If you can measure LLM quality (llmevalkit), you can use those measurements as a reward signal to improve retrieval (adaptive-intelligence).
311
323
 
@@ -24,7 +24,7 @@ Usage:
24
24
  engine.serve_mcp(port=8080)
25
25
  """
26
26
 
27
- __version__ = "4.0.0"
27
+ __version__ = "4.0.3"
28
28
  __author__ = "Venkatkumar Rajan"
29
29
 
30
30
  from adaptive_intelligence.core.engine import AdaptiveAI
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adaptive-intelligence
3
- Version: 4.0.1
3
+ Version: 4.0.3
4
4
  Summary: Self-improving retrieval framework with RL routing, context engineering, MCP integration, agentic workflow, and persistent memory.
5
5
  Author-email: Venkatkumar Rajan <venkatkumarr.vk99@gmail.com>
6
6
  License: Apache-2.0
@@ -70,7 +70,7 @@ Dynamic: license-file
70
70
 
71
71
  <div align="center">
72
72
 
73
- <img src="docs/images/image_ai.png" alt="adaptive-intelligence" width="100%">
73
+ <img src="https://raw.githubusercontent.com/VK-Ant/adaptive-intelligence/main/docs/images/image_ai.png" alt="adaptive-intelligence" width="100%">
74
74
 
75
75
  # adaptive-intelligence
76
76
 
@@ -283,40 +283,52 @@ python demo_mcp_client.py # Connect to MCP server (terminal 2)
283
283
 
284
284
  ## FAQ
285
285
 
286
- **Does it work without an LLM?**
286
+ **1. Does it work without an LLM?**
287
+
287
288
  Yes. Set `llm_backend="none"` and the system returns relevant document excerpts. RL routing, graph activation, memory, and evaluation all work without an LLM.
288
289
 
289
- **Does it work without a vector database?**
290
+ **2. Does it work without a vector database?**
291
+
290
292
  Yes. Set `vectorless=True` for page-level BM25 search with zero dependencies. Same RL routing, same graph, same learning.
291
293
 
292
- **How many queries before it starts learning?**
294
+ **3. How many queries before it starts learning?**
295
+
293
296
  Default warmup is 15 queries. During warmup, the system uses smart heuristic defaults while collecting RL statistics. After 15 queries, the learned policy takes over. Use `pretrained_policy=True` to skip warmup entirely.
294
297
 
295
- **Which retrieval strategies does the RL choose from?**
298
+ **4. Which retrieval strategies does the RL choose from?**
299
+
296
300
  Six routes: keyword only, vector only, hybrid (keyword + vector with RRF), table first, graph first, and graph hybrid. The RL also selects retrieval depth and whether to activate the knowledge graph.
297
301
 
298
- **How is the knowledge graph built?**
302
+ **5. How is the knowledge graph built?**
303
+
299
304
  Automatically during document ingestion from entity co-occurrences. No manual setup. A 5-signal gate decides per-query whether to activate graph traversal.
300
305
 
301
- **What is context engineering?**
306
+ **6. What is context engineering?**
307
+
302
308
  Instead of just stuffing retrieved chunks into a prompt, context engineering optimizes the entire context window — system prompt, memory entries, conversation history, tool results, and chunks — with token budget allocation per component.
303
309
 
304
- **How does agentic mode work?**
310
+ **7. How does agentic mode work?**
311
+
305
312
  The system retrieves, evaluates confidence, and if it's below threshold, refines the query and retrieves again. It can also call registered tools between rounds. Maximum 3 rounds by default.
306
313
 
307
- **Can I add documents after initial ingestion?**
314
+ **8. Can I add documents after initial ingestion?**
315
+
308
316
  Yes. Call `engine.ingest()` again with new documents. The RL policy, knowledge graph, and memory all continue from their current state. No restart needed.
309
317
 
310
- **What about latency?**
318
+ **9. What about latency?**
319
+
311
320
  The system adds approximately 100-150ms overhead per query (classification, RL decision, evaluation, policy update). The LLM call typically takes 500-3000ms. Overhead is roughly 5-10% of total response time.
312
321
 
313
- **How does it save cost?**
322
+ **10. How does it save cost?**
323
+
314
324
  The RL learns optimal retrieval depth per query type. Factual queries get depth 2 (2 chunks), complex queries get depth 8. Fewer chunks = fewer tokens = lower LLM cost. The RL also learns which tools to skip, reducing unnecessary API calls.
315
325
 
316
- **Is it production-ready?**
326
+ **11. Is it production-ready?**
327
+
317
328
  The library has 99 tests, crash recovery with auto-checkpoint, and graceful shutdown. BM25 is in-memory which works for hundreds of documents. For 50K+ documents, a disk-backed index is planned.
318
329
 
319
- **How is this different from LangChain or LlamaIndex?**
330
+ **12. How is this different from LangChain or LlamaIndex?**
331
+
320
332
  Those are orchestration frameworks with static pipelines. You configure the retrieval strategy once. adaptive-intelligence learns the optimal strategy per query type through reinforcement learning. The system improves with every query answered.
321
333
 
322
334
  ## Version History
@@ -375,7 +387,7 @@ Contributions are welcome.
375
387
 
376
388
  ## Also by me
377
389
 
378
- [**llmevalkit**](https://pypi.org/project/llmevalkit/) — 61 metrics for LLM evaluation with HIPAA, GDPR, DPDP, and EU AI Act compliance modules.
390
+ [**llmevalkit**](https://pypi.org/project/llmevalkit/) — 78 metrics for LLM evaluation with HIPAA, GDPR, DPDP, and EU AI Act compliance modules.
379
391
 
380
392
  adaptive-intelligence was born from llmevalkit. If you can measure LLM quality (llmevalkit), you can use those measurements as a reward signal to improve retrieval (adaptive-intelligence).
381
393
 
@@ -4,9 +4,9 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "adaptive-intelligence"
7
- version = "4.0.1"
7
+ version = "4.0.3"
8
8
  description = "Self-improving retrieval framework with RL routing, context engineering, MCP integration, agentic workflow, and persistent memory."
9
- readme = "README.md"
9
+ readme = {file = "README.md", content-type = "text/markdown"}
10
10
  license = {text = "Apache-2.0"}
11
11
  requires-python = ">=3.9"
12
12
  authors = [