@mastra/rag 0.0.2-alpha.9 → 0.1.0-alpha.78

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,545 @@
1
1
  # @mastra/rag
2
2
 
3
+ ## 0.1.0-alpha.78
4
+
5
+ ### Minor Changes
6
+
7
+ - 5916f9d: Update deps from fixed to ^
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [6fa4bd2]
12
+ - Updated dependencies [e2e76de]
13
+ - Updated dependencies [7f24c29]
14
+ - Updated dependencies [67637ba]
15
+ - Updated dependencies [04f3171]
16
+ - @mastra/core@0.2.0-alpha.86
17
+
18
+ ## 0.0.2-alpha.77
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [e9d1b47]
23
+ - @mastra/core@0.2.0-alpha.85
24
+
25
+ ## 0.0.2-alpha.76
26
+
27
+ ### Patch Changes
28
+
29
+ - f646a8b: Update rag deps
30
+
31
+ ## 0.0.2-alpha.75
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies [2f17a5f]
36
+ - Updated dependencies [cb290ee]
37
+ - Updated dependencies [b4d7416]
38
+ - Updated dependencies [38b7f66]
39
+ - @mastra/core@0.2.0-alpha.84
40
+
41
+ ## 0.0.2-alpha.74
42
+
43
+ ### Patch Changes
44
+
45
+ - 9625602: Use mastra core splitted bundles in other packages
46
+ - Updated dependencies [30322ce]
47
+ - Updated dependencies [78eec7c]
48
+ - Updated dependencies [9625602]
49
+ - Updated dependencies [8769a62]
50
+ - @mastra/core@0.2.0-alpha.83
51
+
52
+ ## 0.0.2-alpha.73
53
+
54
+ ### Patch Changes
55
+
56
+ - Updated dependencies [73d112c]
57
+ - @mastra/core@0.1.27-alpha.82
58
+
59
+ ## 0.0.2-alpha.72
60
+
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies [9fb3039]
64
+ - @mastra/core@0.1.27-alpha.81
65
+
66
+ ## 0.0.2-alpha.71
67
+
68
+ ### Patch Changes
69
+
70
+ - a944f1a: Bundle @mastra/rag package with tsup
71
+
72
+ ## 0.0.2-alpha.70
73
+
74
+ ### Patch Changes
75
+
76
+ - 327ece7: Updates for ts versions
77
+ - Updated dependencies [327ece7]
78
+ - @mastra/core@0.1.27-alpha.80
79
+
80
+ ## 0.0.2-alpha.69
81
+
82
+ ### Patch Changes
83
+
84
+ - 21fe536: add keyword tags for packages and update readmes
85
+ - Updated dependencies [21fe536]
86
+ - @mastra/core@0.1.27-alpha.79
87
+
88
+ ## 0.0.2-alpha.68
89
+
90
+ ### Patch Changes
91
+
92
+ - 685108a: Remove syncs and excess rag
93
+ - Updated dependencies [685108a]
94
+ - Updated dependencies [685108a]
95
+ - @mastra/core@0.1.27-alpha.78
96
+
97
+ ## 0.0.2-alpha.67
98
+
99
+ ### Patch Changes
100
+
101
+ - 8105fae: Split embed into embed and embedMany to handle different return types
102
+ - ecdee97: Update return type for chunk to Chunk[]
103
+ - Updated dependencies [8105fae]
104
+ - @mastra/core@0.1.27-alpha.77
105
+
106
+ ## 0.0.2-alpha.66
107
+
108
+ ### Patch Changes
109
+
110
+ - 9c0d010: Deprecated Reranker in favor of rerank function (BREAKING CHANGE)
111
+
112
+ ## 0.0.2-alpha.65
113
+
114
+ ### Patch Changes
115
+
116
+ - Updated dependencies [ae7bf94]
117
+ - Updated dependencies [ae7bf94]
118
+ - @mastra/core@0.1.27-alpha.76
119
+
120
+ ## 0.0.2-alpha.64
121
+
122
+ ### Patch Changes
123
+
124
+ - Updated dependencies [23dcb23]
125
+ - @mastra/core@0.1.27-alpha.75
126
+
127
+ ## 0.0.2-alpha.63
128
+
129
+ ### Patch Changes
130
+
131
+ - Updated dependencies [7b87567]
132
+ - @mastra/core@0.1.27-alpha.74
133
+
134
+ ## 0.0.2-alpha.62
135
+
136
+ ### Patch Changes
137
+
138
+ - Updated dependencies [3427b95]
139
+ - @mastra/core@0.1.27-alpha.73
140
+
141
+ ## 0.0.2-alpha.61
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies [e4d4ede]
146
+ - Updated dependencies [06b2c0a]
147
+ - @mastra/core@0.1.27-alpha.72
148
+
149
+ ## 0.0.2-alpha.60
150
+
151
+ ### Patch Changes
152
+
153
+ - Updated dependencies [d9c8dd0]
154
+ - @mastra/core@0.1.27-alpha.71
155
+
156
+ ## 0.0.2-alpha.59
157
+
158
+ ### Patch Changes
159
+
160
+ - bdaf834: publish packages
161
+
162
+ ## 0.0.2-alpha.58
163
+
164
+ ### Patch Changes
165
+
166
+ - Updated dependencies [dd6d87f]
167
+ - Updated dependencies [04434b6]
168
+ - @mastra/core@0.1.27-alpha.70
169
+
170
+ ## 0.0.2-alpha.57
171
+
172
+ ### Patch Changes
173
+
174
+ - ab1dc59: Add Cloudflare vectorize
175
+ - 4769753: Added turso/libsql support for RAG
176
+
177
+ ## 0.0.2-alpha.56
178
+
179
+ ### Patch Changes
180
+
181
+ - ee856f3: Updated pg filter function and updated docs and example
182
+ - c3047a7: Added tests
183
+
184
+ ## 0.0.2-alpha.55
185
+
186
+ ### Patch Changes
187
+
188
+ - 1944807: Unified logger and major step in better logs
189
+ - Updated dependencies [1944807]
190
+ - Updated dependencies [9ade36e]
191
+ - @mastra/core@0.1.27-alpha.69
192
+
193
+ ## 0.0.2-alpha.54
194
+
195
+ ### Patch Changes
196
+
197
+ - Updated dependencies [0be7181]
198
+ - Updated dependencies [0be7181]
199
+ - @mastra/core@0.1.27-alpha.68
200
+
201
+ ## 0.0.2-alpha.53
202
+
203
+ ### Patch Changes
204
+
205
+ - Updated dependencies [c8ff2f5]
206
+ - @mastra/core@0.1.27-alpha.67
207
+
208
+ ## 0.0.2-alpha.52
209
+
210
+ ### Patch Changes
211
+
212
+ - Updated dependencies [14064f2]
213
+ - @mastra/core@0.1.27-alpha.66
214
+
215
+ ## 0.0.2-alpha.51
216
+
217
+ ### Patch Changes
218
+
219
+ - Updated dependencies [e66643a]
220
+ - @mastra/core@0.1.27-alpha.65
221
+
222
+ ## 0.0.2-alpha.50
223
+
224
+ ### Patch Changes
225
+
226
+ - 1616f70: Added transaction handling to pgvector
227
+
228
+ ## 0.0.2-alpha.49
229
+
230
+ ### Patch Changes
231
+
232
+ - Updated dependencies [f368477]
233
+ - Updated dependencies [d5ec619]
234
+ - @mastra/core@0.1.27-alpha.64
235
+
236
+ ## 0.0.2-alpha.48
237
+
238
+ ### Patch Changes
239
+
240
+ - 5826db3: Updated reference docs and exports for Reranker and GraphRag
241
+
242
+ ## 0.0.2-alpha.47
243
+
244
+ ### Patch Changes
245
+
246
+ - Updated dependencies [e097800]
247
+ - @mastra/core@0.1.27-alpha.63
248
+
249
+ ## 0.0.2-alpha.46
250
+
251
+ ### Patch Changes
252
+
253
+ - Updated dependencies [93a3719]
254
+ - @mastra/core@0.1.27-alpha.62
255
+
256
+ ## 0.0.2-alpha.45
257
+
258
+ ### Patch Changes
259
+
260
+ - Updated dependencies [dc90663]
261
+ - @mastra/core@0.1.27-alpha.61
262
+
263
+ ## 0.0.2-alpha.44
264
+
265
+ ### Patch Changes
266
+
267
+ - 3967e69: Added GraphRAG implementation and updated docs
268
+ - Updated dependencies [3967e69]
269
+ - @mastra/core@0.1.27-alpha.60
270
+
271
+ ## 0.0.2-alpha.43
272
+
273
+ ### Patch Changes
274
+
275
+ - Updated dependencies [b524c22]
276
+ - @mastra/core@0.1.27-alpha.59
277
+
278
+ ## 0.0.2-alpha.42
279
+
280
+ ### Patch Changes
281
+
282
+ - 1874f40: Added re ranking tool to RAG
283
+ - Updated dependencies [1874f40]
284
+ - Updated dependencies [4b1ce2c]
285
+ - @mastra/core@0.1.27-alpha.58
286
+
287
+ ## 0.0.2-alpha.41
288
+
289
+ ### Patch Changes
290
+
291
+ - 7de6d71: Update filter for vector query to work with more stores
292
+ - Updated dependencies [fd494a3]
293
+ - @mastra/core@0.1.27-alpha.57
294
+
295
+ ## 0.0.2-alpha.40
296
+
297
+ ### Patch Changes
298
+
299
+ - ae638a4: make useFilter option optional
300
+ - Updated dependencies [9f3ab05]
301
+ - @mastra/core@0.1.27-alpha.56
302
+
303
+ ## 0.0.2-alpha.39
304
+
305
+ ### Patch Changes
306
+
307
+ - 592e3cf: Add custom rag tools, add vector retrieval, and update docs
308
+ - 837a288: MAJOR Revamp of tools, workflows, syncs.
309
+ - 0b74006: Workflow updates
310
+ - Updated dependencies [592e3cf]
311
+ - Updated dependencies [837a288]
312
+ - Updated dependencies [0b74006]
313
+ - @mastra/core@0.1.27-alpha.55
314
+
315
+ ## 0.0.2-alpha.38
316
+
317
+ ### Patch Changes
318
+
319
+ - eb45d76: Updated PG Vector filter and added rag examples in docs
320
+ - Updated dependencies [d2cd535]
321
+ - @mastra/core@0.1.27-alpha.54
322
+
323
+ ## 0.0.2-alpha.37
324
+
325
+ ### Patch Changes
326
+
327
+ - Updated dependencies [8e7814f]
328
+ - @mastra/core@0.1.27-alpha.53
329
+
330
+ ## 0.0.2-alpha.36
331
+
332
+ ### Patch Changes
333
+
334
+ - Updated dependencies [eedb829]
335
+ - @mastra/core@0.1.27-alpha.52
336
+
337
+ ## 0.0.2-alpha.35
338
+
339
+ ### Patch Changes
340
+
341
+ - Updated dependencies [a7b016d]
342
+ - Updated dependencies [da2e8d3]
343
+ - Updated dependencies [538a136]
344
+ - @mastra/core@0.1.27-alpha.51
345
+
346
+ ## 0.0.2-alpha.34
347
+
348
+ ### Patch Changes
349
+
350
+ - Updated dependencies [401a4d9]
351
+ - @mastra/core@0.1.27-alpha.50
352
+
353
+ ## 0.0.2-alpha.33
354
+
355
+ ### Patch Changes
356
+
357
+ - a621c34: Add validation for indexName in pgVector and dimension for all vector dbs
358
+ - Updated dependencies [79acad0]
359
+ - Updated dependencies [f5dfa20]
360
+ - @mastra/core@0.1.27-alpha.49
361
+
362
+ ## 0.0.2-alpha.32
363
+
364
+ ### Patch Changes
365
+
366
+ - Updated dependencies [b726bf5]
367
+ - @mastra/core@0.1.27-alpha.48
368
+
369
+ ## 0.0.2-alpha.31
370
+
371
+ ### Patch Changes
372
+
373
+ - Updated dependencies [f6ba259]
374
+ - @mastra/core@0.1.27-alpha.47
375
+
376
+ ## 0.0.2-alpha.30
377
+
378
+ ### Patch Changes
379
+
380
+ - 8ae2bbc: Dane publishing
381
+ - 0bd142c: Fixes learned from docs
382
+ - ee4de15: Dane fixes
383
+ - Updated dependencies [8ae2bbc]
384
+ - Updated dependencies [0bd142c]
385
+ - Updated dependencies [ee4de15]
386
+ - @mastra/core@0.1.27-alpha.46
387
+
388
+ ## 0.0.2-alpha.29
389
+
390
+ ### Patch Changes
391
+
392
+ - Updated dependencies [e608d8c]
393
+ - Updated dependencies [002d6d8]
394
+ - @mastra/core@0.1.27-alpha.45
395
+
396
+ ## 0.0.2-alpha.28
397
+
398
+ ### Patch Changes
399
+
400
+ - Updated dependencies [2fa7f53]
401
+ - @mastra/core@0.1.27-alpha.44
402
+
403
+ ## 0.0.2-alpha.27
404
+
405
+ ### Patch Changes
406
+
407
+ - Updated dependencies [2e099d2]
408
+ - Updated dependencies [d6d8159]
409
+ - @mastra/core@0.1.27-alpha.43
410
+
411
+ ## 0.0.2-alpha.26
412
+
413
+ ### Patch Changes
414
+
415
+ - Updated dependencies [4a54c82]
416
+ - @mastra/core@0.1.27-alpha.42
417
+
418
+ ## 0.0.2-alpha.25
419
+
420
+ ### Patch Changes
421
+
422
+ - Updated dependencies [5cdfb88]
423
+ - @mastra/core@0.1.27-alpha.41
424
+
425
+ ## 0.0.2-alpha.24
426
+
427
+ ### Patch Changes
428
+
429
+ - Updated dependencies [9029796]
430
+ - @mastra/core@0.1.27-alpha.40
431
+
432
+ ## 0.0.2-alpha.23
433
+
434
+ ### Patch Changes
435
+
436
+ - 6101f2d: Fix module incompatibility, and dane cli build
437
+ - Updated dependencies [2b01511]
438
+ - @mastra/core@0.1.27-alpha.39
439
+
440
+ ## 0.0.2-alpha.22
441
+
442
+ ### Patch Changes
443
+
444
+ - f031a1f: expose embed from rag, and refactor embed
445
+ - Updated dependencies [f031a1f]
446
+ - @mastra/core@0.1.27-alpha.38
447
+
448
+ ## 0.0.2-alpha.21
449
+
450
+ ### Patch Changes
451
+
452
+ - 45fd5b8: rename MastraDocument to MDocument
453
+ - Updated dependencies [c872875]
454
+ - Updated dependencies [f6da688]
455
+ - Updated dependencies [b5393f1]
456
+ - @mastra/core@0.1.27-alpha.37
457
+
458
+ ## 0.0.2-alpha.20
459
+
460
+ ### Patch Changes
461
+
462
+ - Updated dependencies [f537e33]
463
+ - Updated dependencies [bc40916]
464
+ - Updated dependencies [f7d1131]
465
+ - Updated dependencies [75bf3f0]
466
+ - Updated dependencies [3c4488b]
467
+ - Updated dependencies [d38f7a6]
468
+ - @mastra/core@0.1.27-alpha.36
469
+
470
+ ## 0.0.2-alpha.19
471
+
472
+ ### Patch Changes
473
+
474
+ - 033eda6: More fixes for refactor
475
+ - Updated dependencies [033eda6]
476
+ - @mastra/core@0.1.27-alpha.35
477
+
478
+ ## 0.0.2-alpha.18
479
+
480
+ ### Patch Changes
481
+
482
+ - 837a288: MAJOR Revamp of tools, workflows, syncs.
483
+ - 5811de6: Updates spec-writer example to use new workflows constructs. Small improvements to workflow internals. Switch transformer tokenizer for js compatible one.
484
+ - Updated dependencies [837a288]
485
+ - Updated dependencies [5811de6]
486
+ - @mastra/core@0.1.27-alpha.34
487
+
488
+ ## 0.0.2-alpha.17
489
+
490
+ ### Patch Changes
491
+
492
+ - e1dd94a: update the api for embeddings
493
+ - Updated dependencies [e1dd94a]
494
+ - @mastra/core@0.1.27-alpha.33
495
+
496
+ ## 0.0.2-alpha.16
497
+
498
+ ### Patch Changes
499
+
500
+ - Updated dependencies [2712098]
501
+ - @mastra/core@0.1.27-alpha.32
502
+
503
+ ## 0.0.2-alpha.15
504
+
505
+ ### Patch Changes
506
+
507
+ - Updated dependencies [c2dd6b5]
508
+ - @mastra/core@0.1.27-alpha.31
509
+
510
+ ## 0.0.2-alpha.14
511
+
512
+ ### Patch Changes
513
+
514
+ - 1c3232a: ChromaDB
515
+
516
+ ## 0.0.2-alpha.13
517
+
518
+ ### Patch Changes
519
+
520
+ - Updated dependencies [963c15a]
521
+ - @mastra/core@0.1.27-alpha.30
522
+
523
+ ## 0.0.2-alpha.12
524
+
525
+ ### Patch Changes
526
+
527
+ - Updated dependencies [7d87a15]
528
+ - @mastra/core@0.1.27-alpha.29
529
+
530
+ ## 0.0.2-alpha.11
531
+
532
+ ### Patch Changes
533
+
534
+ - Updated dependencies [1ebd071]
535
+ - @mastra/core@0.1.27-alpha.28
536
+
537
+ ## 0.0.2-alpha.10
538
+
539
+ ### Patch Changes
540
+
541
+ - 779702b: Upstash vector
542
+
3
543
  ## 0.0.2-alpha.9
4
544
 
5
545
  ### Patch Changes
package/LICENSE ADDED
@@ -0,0 +1,44 @@
1
+ Elastic License 2.0 (ELv2)
2
+
3
+ **Acceptance**
4
+ By using the software, you agree to all of the terms and conditions below.
5
+
6
+ **Copyright License**
7
+ The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below
8
+
9
+ **Limitations**
10
+ You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
11
+
12
+ You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
13
+
14
+ You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
15
+
16
+ **Patents**
17
+ The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
18
+
19
+ **Notices**
20
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
21
+
22
+ If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
23
+
24
+ **No Other Rights**
25
+ These terms do not imply any licenses other than those expressly granted in these terms.
26
+
27
+ **Termination**
28
+ If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
29
+
30
+ **No Liability**
31
+ As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
32
+
33
+ **Definitions**
34
+ The _licensor_ is the entity offering these terms, and the _software_ is the software the licensor makes available under these terms, including any portion of it.
35
+
36
+ _you_ refers to the individual or entity agreeing to these terms.
37
+
38
+ _your company_ is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. _control_ means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
39
+
40
+ _your licenses_ are all the licenses granted to you for the software under these terms.
41
+
42
+ _use_ means anything you do with the software requiring one of your licenses.
43
+
44
+ _trademark_ means trademarks, service marks, and similar rights.
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # @mastra/rag
2
+
3
+ The Retrieval-Augmented Generation (RAG) module contains document processing and embedding utilities.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @mastra/rag
9
+ ```
10
+
11
+ ## Components
12
+
13
+ ### Document
14
+
15
+ The `MDocument` class represents text content with associated metadata:
16
+
17
+ ```typescript
18
+ import { MDocument } from '@mastra/rag';
19
+
20
+ const doc = new MDocument({
21
+ text: 'Document content',
22
+ metadata: { source: 'example.txt' },
23
+ });
24
+ ```
25
+
26
+ [Documentation](https://mastra.ai/docs/reference/rag/document)