@retrivora-ai/rag-engine 0.4.5 → 1.0.0

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 (70) hide show
  1. package/README.md +32 -57
  2. package/dist/{ChromaDBProvider-GI7TB7GJ.mjs → ChromaDBProvider-APQVJ5F7.mjs} +2 -2
  3. package/dist/{DocumentChunker-3yElxTO3.d.mts → DocumentChunker-C-sCZPhi.d.mts} +6 -6
  4. package/dist/{DocumentChunker-3yElxTO3.d.ts → DocumentChunker-C-sCZPhi.d.ts} +6 -6
  5. package/dist/{MilvusProvider-WDVTFB7D.mjs → MilvusProvider-35US67MS.mjs} +2 -2
  6. package/dist/{MongoDBProvider-RE3Q5S5B.mjs → MongoDBProvider-COVYZDP6.mjs} +2 -2
  7. package/dist/{PineconeProvider-BE2JWSPD.mjs → PineconeProvider-AWFJQDZL.mjs} +2 -2
  8. package/dist/{PostgreSQLProvider-5HHTK4SU.mjs → PostgreSQLProvider-IEYRJ7XJ.mjs} +2 -2
  9. package/dist/{QdrantProvider-XVDVBNIG.mjs → QdrantProvider-M6TQYZRO.mjs} +2 -2
  10. package/dist/{RagConfig-BgRDL9Vy.d.mts → RagConfig-DRJO4hGU.d.mts} +12 -1
  11. package/dist/{RagConfig-BgRDL9Vy.d.ts → RagConfig-DRJO4hGU.d.ts} +12 -1
  12. package/dist/{RedisProvider-EK2R2PQH.mjs → RedisProvider-3G5PBLZ4.mjs} +2 -2
  13. package/dist/{SimpleGraphProvider-M6T7SE7D.mjs → SimpleGraphProvider-UK7DJW37.mjs} +1 -1
  14. package/dist/{UniversalVectorProvider-YIDRX6VT.mjs → UniversalVectorProvider-FYQ3B2PW.mjs} +3 -3
  15. package/dist/{WeaviateProvider-4CAPQ7UY.mjs → WeaviateProvider-ITHO36IL.mjs} +2 -2
  16. package/dist/{chunk-5KNBWQM6.mjs → chunk-4A47RCG2.mjs} +5 -1
  17. package/dist/{chunk-EDLTMSNY.mjs → chunk-67AJ6SMD.mjs} +1 -1
  18. package/dist/{chunk-PQKTC73Y.mjs → chunk-7SOSCZGS.mjs} +67 -6
  19. package/dist/{chunk-LJWWPTWE.mjs → chunk-FLOSGE6A.mjs} +76 -14
  20. package/dist/{chunk-H6RKMU7W.mjs → chunk-NXUCKY5L.mjs} +1 -1
  21. package/dist/{chunk-KTS3LLHY.mjs → chunk-OOQXNLXD.mjs} +5 -5
  22. package/dist/{chunk-PRC5CZIZ.mjs → chunk-P4HAQ7KB.mjs} +1184 -1359
  23. package/dist/chunk-QMIKLALV.mjs +57 -0
  24. package/dist/{chunk-3QWAK3RZ.mjs → chunk-TYHTZIDP.mjs} +6 -2
  25. package/dist/{chunk-GQT5LF4G.mjs → chunk-U6KHVZLF.mjs} +2 -2
  26. package/dist/{chunk-RK2UDJA2.mjs → chunk-WGSZNY3X.mjs} +1 -1
  27. package/dist/{chunk-XCNXPECE.mjs → chunk-ZNBKHNJ4.mjs} +55 -1
  28. package/dist/handlers/index.d.mts +2 -2
  29. package/dist/handlers/index.d.ts +2 -2
  30. package/dist/handlers/index.js +1415 -1391
  31. package/dist/handlers/index.mjs +3 -3
  32. package/dist/index-CrGMwXfO.d.ts +112 -0
  33. package/dist/index-v669iV-k.d.mts +112 -0
  34. package/dist/index.d.mts +4 -4
  35. package/dist/index.d.ts +4 -4
  36. package/dist/index.mjs +2 -2
  37. package/dist/server.d.mts +104 -158
  38. package/dist/server.d.ts +104 -158
  39. package/dist/server.js +1414 -1390
  40. package/dist/server.mjs +12 -12
  41. package/package.json +5 -1
  42. package/src/config/RagConfig.ts +7 -0
  43. package/src/core/ConfigValidator.ts +66 -492
  44. package/src/core/LangChainAgent.ts +78 -0
  45. package/src/core/Pipeline.ts +210 -240
  46. package/src/core/ProviderHealthCheck.ts +35 -406
  47. package/src/core/ProviderInterfaces.ts +37 -0
  48. package/src/core/ProviderRegistry.ts +70 -55
  49. package/src/core/QueryProcessor.ts +173 -0
  50. package/src/llm/ILLMProvider.ts +10 -0
  51. package/src/llm/LLMFactory.ts +33 -13
  52. package/src/llm/providers/AnthropicProvider.ts +55 -15
  53. package/src/llm/providers/GeminiProvider.ts +51 -0
  54. package/src/llm/providers/OllamaProvider.ts +100 -15
  55. package/src/llm/providers/OpenAIProvider.ts +60 -11
  56. package/src/providers/vectordb/BaseVectorProvider.ts +11 -0
  57. package/src/providers/vectordb/MilvusProvider.ts +4 -0
  58. package/src/providers/vectordb/MongoDBProvider.ts +72 -8
  59. package/src/providers/vectordb/PineconeProvider.ts +60 -5
  60. package/src/providers/vectordb/PostgreSQLProvider.ts +84 -14
  61. package/src/providers/vectordb/QdrantProvider.ts +4 -0
  62. package/src/providers/vectordb/WeaviateProvider.ts +8 -4
  63. package/src/rag/DocumentChunker.ts +15 -19
  64. package/src/rag/LlamaIndexIngestor.ts +61 -0
  65. package/src/rag/Reranker.ts +20 -0
  66. package/src/server.ts +1 -1
  67. package/src/types/index.ts +9 -0
  68. package/dist/chunk-FWCSY2DS.mjs +0 -37
  69. package/dist/index-7qeLTPBL.d.mts +0 -114
  70. package/dist/index-DowY4_K0.d.ts +0 -114
package/dist/server.mjs CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  ChromaDBProvider
3
- } from "./chunk-RK2UDJA2.mjs";
3
+ } from "./chunk-WGSZNY3X.mjs";
4
4
  import {
5
5
  RedisProvider
6
- } from "./chunk-H6RKMU7W.mjs";
6
+ } from "./chunk-NXUCKY5L.mjs";
7
7
  import {
8
8
  WeaviateProvider
9
- } from "./chunk-KTS3LLHY.mjs";
9
+ } from "./chunk-OOQXNLXD.mjs";
10
10
  import {
11
11
  UniversalVectorProvider
12
- } from "./chunk-GQT5LF4G.mjs";
12
+ } from "./chunk-U6KHVZLF.mjs";
13
13
  import {
14
14
  AnthropicProvider,
15
15
  BatchProcessor,
@@ -34,23 +34,23 @@ import {
34
34
  createIngestHandler,
35
35
  createUploadHandler,
36
36
  getRagConfig
37
- } from "./chunk-PRC5CZIZ.mjs";
38
- import "./chunk-EDLTMSNY.mjs";
37
+ } from "./chunk-P4HAQ7KB.mjs";
38
+ import "./chunk-67AJ6SMD.mjs";
39
39
  import {
40
40
  PineconeProvider
41
- } from "./chunk-XCNXPECE.mjs";
41
+ } from "./chunk-ZNBKHNJ4.mjs";
42
42
  import {
43
43
  PostgreSQLProvider
44
- } from "./chunk-LJWWPTWE.mjs";
44
+ } from "./chunk-FLOSGE6A.mjs";
45
45
  import {
46
46
  MongoDBProvider
47
- } from "./chunk-PQKTC73Y.mjs";
47
+ } from "./chunk-7SOSCZGS.mjs";
48
48
  import {
49
49
  MilvusProvider
50
- } from "./chunk-3QWAK3RZ.mjs";
50
+ } from "./chunk-TYHTZIDP.mjs";
51
51
  import {
52
52
  QdrantProvider
53
- } from "./chunk-5KNBWQM6.mjs";
53
+ } from "./chunk-4A47RCG2.mjs";
54
54
  import {
55
55
  BaseVectorProvider
56
56
  } from "./chunk-IMP6FUCY.mjs";
@@ -58,7 +58,7 @@ import {
58
58
  __objRest,
59
59
  __spreadProps,
60
60
  __spreadValues
61
- } from "./chunk-FWCSY2DS.mjs";
61
+ } from "./chunk-QMIKLALV.mjs";
62
62
 
63
63
  // src/config/ConfigBuilder.ts
64
64
  var ConfigBuilder = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retrivora-ai/rag-engine",
3
- "version": "0.4.5",
3
+ "version": "1.0.0",
4
4
  "description": "Retrivora AI is a plug-and-play AI engine for RAG chat experiences — generic vector DB + LLM provider, embeddable or standalone.",
5
5
  "author": "Abhinav Alkuchi",
6
6
  "license": "MIT",
@@ -86,8 +86,12 @@
86
86
  "dependencies": {
87
87
  "@anthropic-ai/sdk": "^0.90.0",
88
88
  "@google/genai": "^1.50.1",
89
+ "@langchain/core": "^1.1.42",
90
+ "@langchain/openai": "^1.4.5",
89
91
  "@pinecone-database/pinecone": "^7.2.0",
90
92
  "axios": "^1.15.0",
93
+ "langchain": "^1.3.5",
94
+ "llamaindex": "^0.12.1",
91
95
  "lucide-react": "^1.8.0",
92
96
  "mammoth": "^1.8.0",
93
97
  "mongodb": "^7.1.1",
@@ -36,6 +36,9 @@ export interface VectorDBConfig {
36
36
  * - scorePath?: string (e.g. 'similarity')
37
37
  * - contentPath?: string (e.g. 'text')
38
38
  *
39
+ * For 'mongodb', the following options are also supported:
40
+ * - numCandidates?: number // controls search recall depth
41
+ *
39
42
  * For multi-table PostgreSQL search, the following options are also supported:
40
43
  * - tables?: string[] | string
41
44
  * - searchFields?: string[] | string // optional override for which columns receive exact-match boosts
@@ -161,6 +164,10 @@ export interface RAGConfig {
161
164
  chunkOverlap?: number;
162
165
  /** Characters used to split text, in order of priority */
163
166
  separators?: string[];
167
+ /** Overall RAG architecture pattern */
168
+ architecture?: 'simple' | 'graph' | 'hybrid' | 'agentic';
169
+ /** Chunking strategy to use during ingestion */
170
+ chunkingStrategy?: 'recursive' | 'markdown' | 'semantic' | 'llamaindex';
164
171
  /** Whether to use query transformation (e.g. HyDE) */
165
172
  useQueryTransformation?: boolean;
166
173
  /** Whether to use graph-based retrieval */