mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
Update README.md
This commit is contained in:
parent
51f397dae8
commit
1275870f95
52
README.md
52
README.md
@ -85,3 +85,55 @@ data: {"type":"progress","data":"Step 1 / Budget used 10%"}
|
||||
data: {"type":"progress","data":"Step 2 / Budget used 25%"}
|
||||
data: {"type":"answer","data":{"action":"answer","answer":"Paris is the capital of France","references":[]}}
|
||||
```
|
||||
|
||||
|
||||
## How Does it Work?
|
||||
|
||||
Not sure a flowchart helps, but here it is:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Start([Start]) --> Init[Initialize context & variables]
|
||||
Init --> CheckBudget{Token budget<br/>exceeded?}
|
||||
CheckBudget -->|No| GetQuestion[Get current question<br/>from gaps]
|
||||
CheckBudget -->|Yes| BeastMode[Enter Beast Mode]
|
||||
|
||||
GetQuestion --> GenPrompt[Generate prompt]
|
||||
GenPrompt --> ModelGen[Generate response<br/>using Gemini]
|
||||
ModelGen --> ActionCheck{Check action<br/>type}
|
||||
|
||||
ActionCheck -->|answer| AnswerCheck{Is original<br/>question?}
|
||||
AnswerCheck -->|Yes| EvalAnswer[Evaluate answer]
|
||||
EvalAnswer --> IsGoodAnswer{Is answer<br/>definitive?}
|
||||
IsGoodAnswer -->|Yes| HasRefs{Has<br/>references?}
|
||||
HasRefs -->|Yes| End([End])
|
||||
HasRefs -->|No| GetQuestion
|
||||
IsGoodAnswer -->|No| StoreBad[Store bad attempt<br/>Reset context]
|
||||
StoreBad --> GetQuestion
|
||||
|
||||
AnswerCheck -->|No| StoreKnowledge[Store as intermediate<br/>knowledge]
|
||||
StoreKnowledge --> GetQuestion
|
||||
|
||||
ActionCheck -->|reflect| ProcessQuestions[Process new<br/>sub-questions]
|
||||
ProcessQuestions --> DedupQuestions{New unique<br/>questions?}
|
||||
DedupQuestions -->|Yes| AddGaps[Add to gaps queue]
|
||||
DedupQuestions -->|No| DisableReflect[Disable reflect<br/>for next step]
|
||||
AddGaps --> GetQuestion
|
||||
DisableReflect --> GetQuestion
|
||||
|
||||
ActionCheck -->|search| SearchQuery[Execute search]
|
||||
SearchQuery --> NewURLs{New URLs<br/>found?}
|
||||
NewURLs -->|Yes| StoreURLs[Store URLs for<br/>future visits]
|
||||
NewURLs -->|No| DisableSearch[Disable search<br/>for next step]
|
||||
StoreURLs --> GetQuestion
|
||||
DisableSearch --> GetQuestion
|
||||
|
||||
ActionCheck -->|visit| VisitURLs[Visit URLs]
|
||||
VisitURLs --> NewContent{New content<br/>found?}
|
||||
NewContent -->|Yes| StoreContent[Store content as<br/>knowledge]
|
||||
NewContent -->|No| DisableVisit[Disable visit<br/>for next step]
|
||||
StoreContent --> GetQuestion
|
||||
DisableVisit --> GetQuestion
|
||||
|
||||
BeastMode --> FinalAnswer[Generate final answer] --> End
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user