@retrivora-ai/rag-engine 0.4.5 → 1.0.1

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 (74) hide show
  1. package/README.md +32 -57
  2. package/dist/{ChromaDBProvider-GI7TB7GJ.mjs → ChromaDBProvider-MIDOR4FW.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-U7SKC27V.mjs} +2 -2
  6. package/dist/{MongoDBProvider-RE3Q5S5B.mjs → MongoDBProvider-Z6ALOVDN.mjs} +2 -2
  7. package/dist/{PineconeProvider-BE2JWSPD.mjs → PineconeProvider-QZNRKTN2.mjs} +2 -2
  8. package/dist/{PostgreSQLProvider-5HHTK4SU.mjs → PostgreSQLProvider-BMOETDZA.mjs} +2 -2
  9. package/dist/{QdrantProvider-XVDVBNIG.mjs → QdrantProvider-YNUNEOZH.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-SR65SCKV.mjs} +2 -2
  13. package/dist/{SimpleGraphProvider-M6T7SE7D.mjs → SimpleGraphProvider-SLOXO4M7.mjs} +1 -1
  14. package/dist/{UniversalVectorProvider-YIDRX6VT.mjs → UniversalVectorProvider-IN67OS56.mjs} +3 -3
  15. package/dist/{WeaviateProvider-4CAPQ7UY.mjs → WeaviateProvider-5FWDFITI.mjs} +2 -2
  16. package/dist/{chunk-5KNBWQM6.mjs → chunk-3DSHW676.mjs} +5 -1
  17. package/dist/{chunk-PRC5CZIZ.mjs → chunk-5W2YWFT3.mjs} +1248 -1361
  18. package/dist/{chunk-H6RKMU7W.mjs → chunk-5YGUXK7Z.mjs} +1 -1
  19. package/dist/{chunk-PQKTC73Y.mjs → chunk-CD6TSNL4.mjs} +67 -6
  20. package/dist/{chunk-RK2UDJA2.mjs → chunk-CFVEZTBJ.mjs} +1 -1
  21. package/dist/{chunk-LJWWPTWE.mjs → chunk-FLOSGE6A.mjs} +76 -14
  22. package/dist/{chunk-GQT5LF4G.mjs → chunk-LR3VMDVK.mjs} +2 -2
  23. package/dist/{chunk-KTS3LLHY.mjs → chunk-M6JSPGAR.mjs} +5 -5
  24. package/dist/{chunk-3QWAK3RZ.mjs → chunk-U55XRW3U.mjs} +6 -2
  25. package/dist/{chunk-XCNXPECE.mjs → chunk-VUQJVIJT.mjs} +55 -1
  26. package/dist/chunk-X4TOT24V.mjs +89 -0
  27. package/dist/{chunk-EDLTMSNY.mjs → chunk-YLTMFW4M.mjs} +1 -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 +1488 -1371
  31. package/dist/handlers/index.mjs +5 -3
  32. package/dist/index-B2mutkgp.d.ts +116 -0
  33. package/dist/index-Bjy0es5a.d.mts +116 -0
  34. package/dist/index.d.mts +17 -11
  35. package/dist/index.d.ts +17 -11
  36. package/dist/index.js +253 -363
  37. package/dist/index.mjs +243 -353
  38. package/dist/server.d.mts +108 -158
  39. package/dist/server.d.ts +108 -158
  40. package/dist/server.js +1452 -1386
  41. package/dist/server.mjs +12 -12
  42. package/package.json +5 -1
  43. package/src/config/RagConfig.ts +7 -0
  44. package/src/core/ConfigValidator.ts +66 -492
  45. package/src/core/LangChainAgent.ts +78 -0
  46. package/src/core/Pipeline.ts +210 -240
  47. package/src/core/ProviderHealthCheck.ts +35 -406
  48. package/src/core/ProviderInterfaces.ts +37 -0
  49. package/src/core/ProviderRegistry.ts +70 -55
  50. package/src/core/QueryProcessor.ts +173 -0
  51. package/src/core/VectorPlugin.ts +7 -0
  52. package/src/handlers/index.ts +45 -0
  53. package/src/llm/ILLMProvider.ts +10 -0
  54. package/src/llm/LLMFactory.ts +33 -13
  55. package/src/llm/providers/AnthropicProvider.ts +55 -15
  56. package/src/llm/providers/GeminiProvider.ts +51 -0
  57. package/src/llm/providers/OllamaProvider.ts +100 -15
  58. package/src/llm/providers/OpenAIProvider.ts +60 -11
  59. package/src/providers/vectordb/BaseVectorProvider.ts +11 -0
  60. package/src/providers/vectordb/MilvusProvider.ts +4 -0
  61. package/src/providers/vectordb/MongoDBProvider.ts +72 -8
  62. package/src/providers/vectordb/PineconeProvider.ts +60 -5
  63. package/src/providers/vectordb/PostgreSQLProvider.ts +84 -14
  64. package/src/providers/vectordb/QdrantProvider.ts +4 -0
  65. package/src/providers/vectordb/WeaviateProvider.ts +8 -4
  66. package/src/rag/DocumentChunker.ts +15 -19
  67. package/src/rag/EntityExtractor.ts +3 -0
  68. package/src/rag/LlamaIndexIngestor.ts +61 -0
  69. package/src/rag/Reranker.ts +20 -0
  70. package/src/server.ts +1 -1
  71. package/src/types/index.ts +9 -0
  72. package/dist/chunk-FWCSY2DS.mjs +0 -37
  73. package/dist/index-7qeLTPBL.d.mts +0 -114
  74. 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-CFVEZTBJ.mjs";
4
4
  import {
5
5
  RedisProvider
6
- } from "./chunk-H6RKMU7W.mjs";
6
+ } from "./chunk-5YGUXK7Z.mjs";
7
7
  import {
8
8
  WeaviateProvider
9
- } from "./chunk-KTS3LLHY.mjs";
9
+ } from "./chunk-M6JSPGAR.mjs";
10
10
  import {
11
11
  UniversalVectorProvider
12
- } from "./chunk-GQT5LF4G.mjs";
12
+ } from "./chunk-LR3VMDVK.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-5W2YWFT3.mjs";
38
+ import "./chunk-YLTMFW4M.mjs";
39
39
  import {
40
40
  PineconeProvider
41
- } from "./chunk-XCNXPECE.mjs";
41
+ } from "./chunk-VUQJVIJT.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-CD6TSNL4.mjs";
48
48
  import {
49
49
  MilvusProvider
50
- } from "./chunk-3QWAK3RZ.mjs";
50
+ } from "./chunk-U55XRW3U.mjs";
51
51
  import {
52
52
  QdrantProvider
53
- } from "./chunk-5KNBWQM6.mjs";
53
+ } from "./chunk-3DSHW676.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-X4TOT24V.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.1",
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 */