mirror of
https://github.com/aljazceru/Tutorial-Codebase-Knowledge.git
synced 2025-12-18 15:04:20 +01:00
1.9 KiB
1.9 KiB
Design Doc: Your Project Name
Please DON'T remove notes for AI
Requirements
Notes for AI: Keep it simple and clear. If the requirements are abstract, write concrete user stories
Flow Design
Notes for AI:
- Consider the design patterns of agent, map-reduce, rag, and workflow. Apply them if they fit.
- Present a concise, high-level description of the workflow.
Applicable Design Pattern:
- Map the file summary into chunks, then reduce these chunks into a final summary.
- Agentic file finder
- Context: The entire summary of the file
- Action: Find the file
Flow high-level Design:
- First Node: This node is for ...
- Second Node: This node is for ...
- Third Node: This node is for ...
flowchart TD
firstNode[First Node] --> secondNode[Second Node]
secondNode --> thirdNode[Third Node]
Utility Functions
Notes for AI:
- Understand the utility function definition thoroughly by reviewing the doc.
- Include only the necessary utility functions, based on nodes in the flow.
-
Call LLM (
utils/call_llm.py)- Input: prompt (str)
- Output: response (str)
- Generally used by most nodes for LLM tasks
-
Embedding (
utils/get_embedding.py)- Input: str
- Output: a vector of 3072 floats
- Used by the second node to embed text
Node Design
Shared Memory
Notes for AI: Try to minimize data redundancy
The shared memory structure is organized as follows:
shared = {
"key": "value"
}
Node Steps
Notes for AI: Carefully decide whether to use Batch/Async Node/Flow.
- First Node
- Purpose: Provide a short explanation of the node’s function
- Type: Decide between Regular, Batch, or Async
- Steps:
- prep: Read "key" from the shared store
- exec: Call the utility function
- post: Write "key" to the shared store
- Second Node ...