@clidey/dory 0.14.0 → 0.16.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.
- package/docs/features.mdx +363 -140
- package/k8s/Dockerfile +1 -2
- package/package.json +1 -1
package/docs/features.mdx
CHANGED
|
@@ -1,217 +1,440 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description:
|
|
2
|
+
title: 'Features'
|
|
3
|
+
description: 'Overview of available components and features'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## Headings Examples
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
```mdx
|
|
9
|
+
# Heading 1
|
|
10
|
+
```
|
|
11
|
+
# Heading 1
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
```mdx
|
|
14
|
+
## Heading 2
|
|
15
|
+
```
|
|
16
|
+
# Heading 2
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
```mdx
|
|
19
|
+
### Heading 3
|
|
20
|
+
```
|
|
21
|
+
# Heading 3
|
|
22
|
+
```mdx
|
|
23
|
+
#### Heading 4
|
|
24
|
+
```
|
|
25
|
+
# Heading 4
|
|
26
|
+
```mdx
|
|
27
|
+
##### Heading 5
|
|
28
|
+
```
|
|
29
|
+
# Heading 5
|
|
30
|
+
```mdx
|
|
31
|
+
###### Heading 6
|
|
32
|
+
```
|
|
33
|
+
# Heading 6
|
|
13
34
|
|
|
14
|
-
|
|
35
|
+
<br />
|
|
15
36
|
|
|
16
|
-
|
|
37
|
+
## Lists Examples
|
|
17
38
|
|
|
18
|
-
|
|
39
|
+
```mdx
|
|
40
|
+
- List item 1
|
|
41
|
+
- List item 2
|
|
42
|
+
- List item 3
|
|
43
|
+
```
|
|
19
44
|
|
|
20
|
-
|
|
45
|
+
- List item 1
|
|
46
|
+
- List item 2
|
|
47
|
+
- List item 3
|
|
21
48
|
|
|
22
|
-
|
|
49
|
+
```mdx
|
|
50
|
+
1. List item 1
|
|
51
|
+
2. List item 2
|
|
52
|
+
3. List item 3
|
|
53
|
+
```
|
|
23
54
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- Access to the Morphik Console for interactive chat or access to the Python SDK for programmatic use.
|
|
55
|
+
1. List item 1
|
|
56
|
+
2. List item 2
|
|
57
|
+
3. List item 3
|
|
28
58
|
|
|
29
|
-
> <Check>
|
|
30
|
-
> Make sure your user account has permissions to query documents and knowledge graphs.
|
|
31
|
-
>
|
|
32
|
-
---
|
|
33
59
|
|
|
34
|
-
## 3. Workflow Overview
|
|
35
60
|
|
|
36
|
-
|
|
61
|
+
<br />
|
|
37
62
|
|
|
38
|
-
|
|
39
|
-
- Use natural language to query documents interactively.
|
|
40
|
-
- Receive well-organized answers with clear source attributions.
|
|
41
|
-
- Understand how the agent leverages multiple tools for retrieval and analysis.
|
|
63
|
+
### Images
|
|
42
64
|
|
|
43
|
-
|
|
65
|
+
```mdx
|
|
66
|
+
<img src="./assets/dory.jpeg" alt="Example image" className="object-cover w-64 h-64" />
|
|
67
|
+
```
|
|
44
68
|
|
|
45
|
-
|
|
69
|
+
<img src="./assets/dory.jpeg" alt="Example image" className="object-cover w-64 h-64" />
|
|
46
70
|
|
|
47
|
-
### Difficulty Level
|
|
48
71
|
|
|
49
|
-
|
|
72
|
+
<br />
|
|
73
|
+
<br />
|
|
74
|
+
<br />
|
|
50
75
|
|
|
51
|
-
|
|
76
|
+
## Code Components
|
|
52
77
|
|
|
53
|
-
|
|
78
|
+
### Code Block
|
|
79
|
+
```typescript
|
|
80
|
+
function example() {
|
|
81
|
+
return "Hello World";
|
|
82
|
+
}
|
|
83
|
+
```
|
|
54
84
|
|
|
55
|
-
###
|
|
85
|
+
### Code Group Block
|
|
56
86
|
|
|
57
|
-
|
|
87
|
+
<CodeGroup>
|
|
88
|
+
```typescript
|
|
89
|
+
function example(): string {
|
|
90
|
+
return "Hello World";
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
```javascript
|
|
94
|
+
function example() {
|
|
95
|
+
return "Hello World";
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
</CodeGroup>
|
|
58
99
|
|
|
59
|
-
- Use the Console to upload or verify documents.
|
|
60
|
-
- Or use the Python SDK `ingest_text()` or `ingest_file()` functions.
|
|
61
100
|
|
|
62
|
-
|
|
101
|
+
<br />
|
|
102
|
+
<br />
|
|
103
|
+
<br />
|
|
63
104
|
|
|
64
|
-
The Morphik Agent acts as the orchestrator between user queries and Morphik's internal tools.
|
|
65
105
|
|
|
66
|
-
|
|
67
|
-
- It converts user input into function calls to relevant Morphik APIs.
|
|
106
|
+
## Interactive Components
|
|
68
107
|
|
|
69
|
-
|
|
108
|
+
### Mermaid
|
|
70
109
|
|
|
71
|
-
```
|
|
72
|
-
|
|
110
|
+
```mdx
|
|
111
|
+
mermaid
|
|
112
|
+
graph TD
|
|
73
113
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
```
|
|
114
|
+
%% Main Start
|
|
115
|
+
Start([Start Process]) --> Validate[Validate Input]
|
|
77
116
|
|
|
78
|
-
|
|
117
|
+
%% Decision Point
|
|
118
|
+
Validate -->|Valid| ProcessData{Is Data Clean?}
|
|
119
|
+
Validate -->|Invalid| Error[Show Error Message]
|
|
79
120
|
|
|
80
|
-
|
|
121
|
+
%% Clean Data Branch
|
|
122
|
+
ProcessData -->|Yes| Clean[Clean Data]
|
|
123
|
+
Clean --> Analyze[Analyze Data]
|
|
81
124
|
|
|
82
|
-
|
|
83
|
-
|
|
125
|
+
%% Dirty Data Branch
|
|
126
|
+
ProcessData -->|No| Notify[Notify User]
|
|
127
|
+
Notify --> Wait[Wait for Input]
|
|
128
|
+
Wait --> Validate
|
|
84
129
|
|
|
85
|
-
|
|
130
|
+
%% Parallel Branches After Analysis
|
|
131
|
+
Analyze --> Split1 & Split2
|
|
86
132
|
|
|
87
|
-
|
|
88
|
-
|
|
133
|
+
subgraph Parallel Tasks
|
|
134
|
+
Split1[Generate Report] --> Merge
|
|
135
|
+
Split2[Update Dashboard] --> Merge
|
|
136
|
+
end
|
|
89
137
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
138
|
+
Merge --> Decision2{Is More Input Needed?}
|
|
139
|
+
Decision2 -->|Yes| WaitMore[Wait for More Input]
|
|
140
|
+
WaitMore --> Validate
|
|
141
|
+
Decision2 -->|No| End([End Process])
|
|
142
|
+
|
|
143
|
+
%% Style and Class Definitions
|
|
144
|
+
classDef decision fill:#f9f,stroke:#333,stroke-width:2px;
|
|
145
|
+
class ProcessData,Decision2 decision;
|
|
94
146
|
|
|
95
|
-
asyncio.run(chat(agent, "What is reinforcement learning?"))
|
|
96
147
|
```
|
|
97
148
|
|
|
98
|
-
|
|
99
|
-
>
|
|
100
|
-
>
|
|
101
|
-
### Step 4: Execute Conversational Queries
|
|
149
|
+
<strong>
|
|
150
|
+
<p>Note: Mermaid should be inside a code block with type "mermaid"</p>
|
|
151
|
+
</strong>
|
|
102
152
|
|
|
103
|
-
|
|
153
|
+
```mermaid
|
|
154
|
+
graph TD
|
|
104
155
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
- "What entities appear in the contract documents?"
|
|
156
|
+
%% Main Start
|
|
157
|
+
Start([Start Process]) --> Validate[Validate Input]
|
|
108
158
|
|
|
109
|
-
|
|
159
|
+
%% Decision Point
|
|
160
|
+
Validate -->|Valid| ProcessData{Is Data Clean?}
|
|
161
|
+
Validate -->|Invalid| Error[Show Error Message]
|
|
110
162
|
|
|
111
|
-
|
|
163
|
+
%% Clean Data Branch
|
|
164
|
+
ProcessData -->|Yes| Clean[Clean Data]
|
|
165
|
+
Clean --> Analyze[Analyze Data]
|
|
112
166
|
|
|
113
|
-
|
|
167
|
+
%% Dirty Data Branch
|
|
168
|
+
ProcessData -->|No| Notify[Notify User]
|
|
169
|
+
Notify --> Wait[Wait for Input]
|
|
170
|
+
Wait --> Validate
|
|
114
171
|
|
|
115
|
-
|
|
172
|
+
%% Parallel Branches After Analysis
|
|
173
|
+
Analyze --> Split1 & Split2
|
|
116
174
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
- **Other tools** like code execution and persistent memory saving.
|
|
175
|
+
subgraph Parallel Tasks
|
|
176
|
+
Split1[Generate Report] --> Merge
|
|
177
|
+
Split2[Update Dashboard] --> Merge
|
|
178
|
+
end
|
|
122
179
|
|
|
123
|
-
|
|
180
|
+
Merge --> Decision2{Is More Input Needed?}
|
|
181
|
+
Decision2 -->|Yes| WaitMore[Wait for More Input]
|
|
182
|
+
WaitMore --> Validate
|
|
183
|
+
Decision2 -->|No| End([End Process])
|
|
124
184
|
|
|
125
|
-
|
|
185
|
+
%% Style and Class Definitions
|
|
186
|
+
classDef decision fill:#f9f,stroke:#333,stroke-width:2px;
|
|
187
|
+
class ProcessData,Decision2 decision;
|
|
126
188
|
|
|
127
|
-
|
|
189
|
+
```
|
|
128
190
|
|
|
129
|
-
|
|
130
|
-
- **Use Multi-Turn Conversations**: Provide context from earlier messages to get more precise answers.
|
|
131
|
-
- **Attribute Your Sources**: The agent returns source references for transparent answers.
|
|
132
|
-
- **Monitor Token Limits**: Be mindful of model token constraints; truncate or segment documents if needed.
|
|
133
|
-
- **Keep Your Documents Up to Date**: Re-ingest changed documents so retrieval returns current info.
|
|
191
|
+
### Accordion
|
|
134
192
|
|
|
135
|
-
|
|
193
|
+
```mdx
|
|
194
|
+
<AccordionGroup>
|
|
195
|
+
<Accordion title="First Section" icon="DocumentIcon">
|
|
196
|
+
This is the content of the first accordion section.
|
|
197
|
+
</Accordion>
|
|
198
|
+
<Accordion title="Second Section" icon="CodeBracketIcon">
|
|
199
|
+
This is the content of the second accordion section.
|
|
200
|
+
</Accordion>
|
|
201
|
+
</AccordionGroup>
|
|
202
|
+
```
|
|
136
203
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
</Accordion>
|
|
145
|
-
<Accordion title="Agent Fails or Crashes During Execution">
|
|
146
|
-
- Confirm your Morphik service is running with adequate resources.
|
|
147
|
-
- Check logs for errors related to tool invocation or model loading.
|
|
148
|
-
- Validate your authentication token or context is correct.
|
|
149
|
-
- Check model supported in your configuration (e.g. GPT-4).
|
|
150
|
-
</Accordion>
|
|
151
|
-
<Accordion title="Sources or Citations Are Missing in Responses">
|
|
152
|
-
- Ensure your documents contain proper metadata with chunks.
|
|
153
|
-
- Confirm the agent is using the correct source map.
|
|
154
|
-
- Verify that retrieval calls return source IDs.
|
|
155
|
-
</Accordion>
|
|
204
|
+
<AccordionGroup>
|
|
205
|
+
<Accordion title="First Section" icon="DocumentIcon">
|
|
206
|
+
This is the content of the first accordion section.
|
|
207
|
+
</Accordion>
|
|
208
|
+
<Accordion title="Second Section" icon="CodeBracketIcon">
|
|
209
|
+
This is the content of the second accordion section.
|
|
210
|
+
</Accordion>
|
|
156
211
|
</AccordionGroup>
|
|
157
212
|
|
|
158
|
-
|
|
213
|
+
### Callouts
|
|
159
214
|
|
|
160
|
-
|
|
215
|
+
```mdx
|
|
216
|
+
<Note>
|
|
217
|
+
This is a note callout with important information.
|
|
218
|
+
</Note>
|
|
219
|
+
```
|
|
161
220
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
221
|
+
<Note>
|
|
222
|
+
This is a note callout with important information.
|
|
223
|
+
</Note>
|
|
165
224
|
|
|
166
|
-
```
|
|
167
|
-
|
|
225
|
+
```mdx
|
|
226
|
+
<Warning>
|
|
227
|
+
This is a warning callout for critical information.
|
|
228
|
+
</Warning>
|
|
168
229
|
```
|
|
169
230
|
|
|
170
|
-
|
|
171
|
-
|
|
231
|
+
<Warning>
|
|
232
|
+
This is a warning callout for critical information.
|
|
233
|
+
</Warning>
|
|
172
234
|
|
|
173
|
-
|
|
235
|
+
```mdx
|
|
236
|
+
<Info>
|
|
237
|
+
This is an info callout for general information.
|
|
238
|
+
</Info>
|
|
239
|
+
```
|
|
174
240
|
|
|
175
|
-
|
|
241
|
+
<Info>
|
|
242
|
+
This is an info callout for general information.
|
|
243
|
+
</Info>
|
|
176
244
|
|
|
177
|
-
```
|
|
178
|
-
|
|
245
|
+
```mdx
|
|
246
|
+
<Tip>
|
|
247
|
+
This is a tip callout for helpful suggestions.
|
|
248
|
+
</Tip>
|
|
249
|
+
```
|
|
179
250
|
|
|
180
|
-
|
|
251
|
+
<Tip>
|
|
252
|
+
This is a tip callout for helpful suggestions.
|
|
253
|
+
</Tip>
|
|
181
254
|
|
|
182
|
-
|
|
183
|
-
|
|
255
|
+
```mdx
|
|
256
|
+
<Check>
|
|
257
|
+
This is a check callout for completed items.
|
|
258
|
+
</Check>
|
|
184
259
|
```
|
|
185
260
|
|
|
186
|
-
|
|
261
|
+
<Check>
|
|
262
|
+
This is a check callout for completed items.
|
|
263
|
+
</Check>
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
<br />
|
|
267
|
+
|
|
268
|
+
### Cards
|
|
269
|
+
```mdx
|
|
270
|
+
<CardGroup cols={2}>
|
|
271
|
+
<Card
|
|
272
|
+
title="Example Card"
|
|
273
|
+
description="This is an example card component with an icon and title."
|
|
274
|
+
icon="FileText"
|
|
275
|
+
href="#"
|
|
276
|
+
/>
|
|
277
|
+
<Card
|
|
278
|
+
title="Another Card"
|
|
279
|
+
description="This is another example card with different content."
|
|
280
|
+
icon="Code"
|
|
281
|
+
href="#"
|
|
282
|
+
/>
|
|
283
|
+
</CardGroup>
|
|
284
|
+
```
|
|
187
285
|
|
|
188
|
-
|
|
286
|
+
<CardGroup cols={2}>
|
|
287
|
+
<Card
|
|
288
|
+
title="Example Card"
|
|
289
|
+
description="This is an example card component with an icon and title."
|
|
290
|
+
icon="FileText"
|
|
291
|
+
href="#"
|
|
292
|
+
/>
|
|
293
|
+
<Card
|
|
294
|
+
title="Another Card"
|
|
295
|
+
description="This is another example card with different content."
|
|
296
|
+
icon="Code"
|
|
297
|
+
href="#"
|
|
298
|
+
/>
|
|
299
|
+
</CardGroup>
|
|
300
|
+
|
|
301
|
+
<br />
|
|
302
|
+
|
|
303
|
+
### Expandable
|
|
304
|
+
|
|
305
|
+
```mdx
|
|
306
|
+
<Expandable title="Click to Expand">
|
|
307
|
+
This is an expandable section that can be toggled.
|
|
308
|
+
</Expandable>
|
|
309
|
+
```
|
|
189
310
|
|
|
190
|
-
|
|
311
|
+
<Expandable title="Click to Expand">
|
|
312
|
+
This is an expandable section that can be toggled.
|
|
313
|
+
</Expandable>
|
|
191
314
|
|
|
192
|
-
|
|
193
|
-
- Learn about [Building Knowledge Graphs](/guides/knowledge-graphs/build-knowledge-graph) to enhance entity-level understanding.
|
|
194
|
-
- Review [Cache-Augmented Generation](/guides/integrations-and-caching/cache-augmentation) to accelerate response times via document caching.
|
|
195
|
-
- Deep dive into Morphik Console features in [Using the Morphik Console](/getting-started/first-steps-and-validation/using-the-morphik-console).
|
|
196
|
-
- Consult the [Agent code & tools description](/core/agent.py) for advanced customization.
|
|
315
|
+
### Source
|
|
197
316
|
|
|
198
|
-
|
|
317
|
+
```mdx
|
|
318
|
+
<Source url="https://github.com/clidey/dory" paths={[
|
|
319
|
+
{ path: "src/mdx/source.tsx", range: "1-46" },
|
|
320
|
+
{ path: "docs/features.mdx", range: "318-322" },
|
|
321
|
+
]} />
|
|
322
|
+
```
|
|
199
323
|
|
|
200
|
-
|
|
324
|
+
<Source url="https://github.com/clidey/dory" paths={[
|
|
325
|
+
{ path: "src/mdx/source.tsx", range: "1-46" },
|
|
326
|
+
{ path: "docs/features.mdx", range: "318-322" },
|
|
327
|
+
]} />
|
|
201
328
|
|
|
202
|
-
|
|
329
|
+
<br />
|
|
330
|
+
<br />
|
|
331
|
+
<br />
|
|
203
332
|
|
|
204
|
-
---
|
|
205
333
|
|
|
206
|
-
##
|
|
334
|
+
## Special Components
|
|
207
335
|
|
|
208
|
-
|
|
209
|
-
- [Morphik Python SDK](https://morphik.ai/docs/sdks/python/README)
|
|
210
|
-
- [Multimodal Search Guide](https://morphik.ai/docs/guides/core-workflows/multimodal-search)
|
|
211
|
-
- [Knowledge Graph Guide](https://morphik.ai/docs/guides/knowledge-graphs/build-knowledge-graph)
|
|
212
|
-
- [Cache Augmented Generation Guide](https://morphik.ai/docs/guides/integrations-and-caching/cache-augmentation)
|
|
213
|
-
- [Morphik Agent Source Code](https://github.com/morphik-org/morphik-core/blob/main/core/agent.py)
|
|
336
|
+
### Grids
|
|
214
337
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
338
|
+
#### Rows
|
|
339
|
+
```mdx
|
|
340
|
+
<Row cols={2}>
|
|
341
|
+
<Icon icon="FileText" />
|
|
342
|
+
<Icon icon="CheckCircle" />
|
|
343
|
+
</Row>
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
<Row cols={2}>
|
|
347
|
+
<Icon icon="FileText" />
|
|
348
|
+
<Icon icon="CheckCircle" />
|
|
349
|
+
</Row>
|
|
350
|
+
|
|
351
|
+
<br />
|
|
352
|
+
|
|
353
|
+
#### Columns
|
|
354
|
+
|
|
355
|
+
```mdx
|
|
356
|
+
<Col>
|
|
357
|
+
<Icon icon="FileText" />
|
|
358
|
+
<Icon icon="FileText" />
|
|
359
|
+
</Col>
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
<Col>
|
|
363
|
+
<Icon icon="FileText" />
|
|
364
|
+
<Icon icon="FileText" />
|
|
365
|
+
</Col>
|
|
366
|
+
|
|
367
|
+
<br />
|
|
368
|
+
<br />
|
|
369
|
+
<br />
|
|
370
|
+
|
|
371
|
+
### Latex
|
|
372
|
+
|
|
373
|
+
```mdx
|
|
374
|
+
<Latex>
|
|
375
|
+
E = mc^2
|
|
376
|
+
</Latex>
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
<Latex>
|
|
380
|
+
E = mc^2
|
|
381
|
+
</Latex>
|
|
382
|
+
|
|
383
|
+
<br />
|
|
384
|
+
<br />
|
|
385
|
+
<br />
|
|
386
|
+
|
|
387
|
+
### Tables
|
|
388
|
+
|
|
389
|
+
```mdx
|
|
390
|
+
| Property | Description |
|
|
391
|
+
| -------- | ------------------------------------- |
|
|
392
|
+
| Name | Full name of user |
|
|
393
|
+
| Age | Reported age |
|
|
394
|
+
| Joined | Whether the user joined the community |
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
| Property | Description |
|
|
398
|
+
| -------- | ------------------------------------- |
|
|
399
|
+
| Name | Full name of user |
|
|
400
|
+
| Age | Reported age |
|
|
401
|
+
| Joined | Whether the user joined the community |
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
### Steps
|
|
405
|
+
|
|
406
|
+
```mdx
|
|
407
|
+
<Steps>
|
|
408
|
+
<Step title="First Step">
|
|
409
|
+
This is the first step in the process.
|
|
410
|
+
</Step>
|
|
411
|
+
<Step title="Second Step">
|
|
412
|
+
This is the second step in the process.
|
|
413
|
+
</Step>
|
|
414
|
+
</Steps>
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
<Steps>
|
|
418
|
+
<Step title="First Step">
|
|
419
|
+
This is the first step in the process.
|
|
420
|
+
</Step>
|
|
421
|
+
<Step title="Second Step">
|
|
422
|
+
This is the second step in the process.
|
|
423
|
+
</Step>
|
|
424
|
+
</Steps>
|
|
425
|
+
|
|
426
|
+
### Icons
|
|
427
|
+
|
|
428
|
+
```mdx
|
|
429
|
+
<Col rows={2}>
|
|
430
|
+
<Icon icon="Code" />
|
|
431
|
+
<Icon icon="FileText" />
|
|
432
|
+
<Icon icon="CheckCircle" />
|
|
433
|
+
</Col>
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
<Row cols={3}>
|
|
437
|
+
<Icon icon="Code" />
|
|
438
|
+
<Icon icon="FileText" />
|
|
439
|
+
<Icon icon="CheckCircle" />
|
|
440
|
+
</Row>
|
package/k8s/Dockerfile
CHANGED