Skip to content

Commit d3b6070

Browse files
committed
refactor: Organize examples into categorical subdirectories
- Created 4 main category directories for better organization: * Core Features/ - Basic LLM operations (4 files) * Agent Examples/ - Agent implementations (2 files) * Document Processing/ - Document handling (3 files) * Requirements Extraction/ - Complete Task 7 pipeline (8 files) - All 18 example files reorganized into logical categories - Updated examples/README.md with new folder structure - All command paths updated to reflect new structure - Deleted duplicate phase3_integration.py (empty file) File Moves: - Core Features: basic_completion.py, chat_session.py, chain_prompts.py, parser_demo.py - Agent Examples: deepagent_demo.py, config_loader_demo.py - Document Processing: pdf_processing.py, ai_enhanced_processing.py, tag_aware_extraction.py - Requirements Extraction: 8 requirements extraction demos (complete pipeline) Benefits: - Improved discoverability (logical grouping) - Better maintainability (clear categories) - Easier navigation for new users - Scalable structure for future additions Verification: Tested requirements_enhanced_output_demo.py - all 12 demos passing (100%) Task 7 Status: Complete (99-100% accuracy) Pipeline Version: 1.0.0
1 parent e7d2147 commit d3b6070

19 files changed

+44
-44
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/README.md

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -44,75 +44,95 @@ examples/
4444

4545
**1. Basic LLM Completion**
4646
```bash
47-
python examples/basic_completion.py
47+
python "examples/Core Features/basic_completion.py"
4848
```
4949
Simple demonstration of LLM text completion.
5050

5151
**2. Chat Session**
5252
```bash
53-
python examples/chat_session.py
53+
python "examples/Core Features/chat_session.py"
5454
```
5555
Interactive chat session with conversation history.
5656

5757
**3. Prompt Chaining**
5858
```bash
59-
python examples/chain_prompts.py
59+
python "examples/Core Features/chain_prompts.py"
6060
```
6161
Chain multiple prompts together for complex workflows.
6262

63+
**4. Parser Demo**
64+
```bash
65+
python "examples/Core Features/parser_demo.py"
66+
```
67+
Demonstrate various parsing capabilities.
68+
69+
### Agent Examples
70+
71+
**5. Deep Agent**
72+
```bash
73+
python "examples/Agent Examples/deepagent_demo.py"
74+
```
75+
Advanced agent with planning and execution capabilities.
76+
77+
**6. Configuration Loader**
78+
```bash
79+
python "examples/Agent Examples/config_loader_demo.py"
80+
```
81+
Load and manage configuration files.
82+
6383
### Document Processing
6484

65-
**4. PDF Processing**
85+
**7. PDF Processing**
6686
```bash
67-
python examples/pdf_processing.py
87+
python "examples/Document Processing/pdf_processing.py"
6888
```
6989
Extract and process PDF documents.
7090

71-
**5. AI-Enhanced Processing**
91+
**8. AI-Enhanced Processing**
7292
```bash
73-
python examples/ai_enhanced_processing.py
93+
python "examples/Document Processing/ai_enhanced_processing.py"
7494
```
7595
Advanced document processing with AI enhancements.
7696

77-
**6. Tag-Aware Extraction**
97+
**9. Tag-Aware Extraction**
7898
```bash
79-
python examples/tag_aware_extraction.py
99+
python "examples/Document Processing/tag_aware_extraction.py"
80100
```
81101
Extract content based on document tags.
82102

83103
### Requirements Extraction (Complete Task 7 Pipeline)
84104

85105
The requirements extraction examples demonstrate the complete 6-phase improvement pipeline that achieves 99-100% accuracy:
86106

87-
**7. Basic Requirements Extraction**
107+
**10. Basic Requirements Extraction**
88108
```bash
89-
python examples/requirements_extraction.py
109+
python "examples/Requirements Extraction/requirements_extraction.py"
90110
# or
91-
python examples/requirements_extraction_demo.py
111+
python "examples/Requirements Extraction/requirements_extraction_demo.py"
92112
# or
93-
python examples/extract_requirements_demo.py
113+
python "examples/Requirements Extraction/extract_requirements_demo.py"
94114
```
95115
Basic requirements extraction from documents.
96116

97-
**8. Few-Shot Learning (Accuracy: +2-3%)**
117+
**11. Few-Shot Learning (Accuracy: +2-3%)**
98118
```bash
99-
python examples/requirements_few_shot_learning_demo.py
119+
python "examples/Requirements Extraction/requirements_few_shot_learning_demo.py"
100120
```
101121
Demonstrates adaptive few-shot learning with 14+ examples across 9 tags:
102122
- Example selection based on document tags
103123
- Similarity-based retrieval
104124
- Performance tracking
105125
- Adaptive learning
106126

107-
**9. Few-Shot Integration**
127+
**12. Few-Shot Integration**
108128
```bash
109-
python examples/requirements_few_shot_integration.py
129+
python "examples/Requirements Extraction/requirements_few_shot_integration.py"
110130
```
111131
Integration of few-shot learning into extraction pipeline.
112132

113-
**10. Enhanced Extraction Instructions (Accuracy: +3-5%)**
133+
**13. Enhanced Extraction Instructions (Accuracy: +3-5%)**
114134
```bash
115-
python examples/requirements_extraction_instructions_demo.py
135+
python "examples/Requirements Extraction/requirements_extraction_instructions_demo.py"
116136
```
117137
Comprehensive extraction instructions covering:
118138
- Requirement identification patterns
@@ -122,19 +142,19 @@ Comprehensive extraction instructions covering:
122142
- Ambiguity resolution
123143
- Quality validation
124144

125-
**11. Multi-Stage Extraction (Accuracy: +1-2%)**
145+
**14. Multi-Stage Extraction (Accuracy: +1-2%)**
126146
```bash
127-
python examples/requirements_multi_stage_extraction_demo.py
147+
python "examples/Requirements Extraction/requirements_multi_stage_extraction_demo.py"
128148
```
129149
Four-stage extraction pipeline:
130150
- Stage 1: Explicit requirements (modal verbs, numbered IDs)
131151
- Stage 2: Implicit requirements (behavioral descriptions)
132152
- Stage 3: Consolidation (merge and deduplicate)
133153
- Stage 4: Validation (quality checks)
134154

135-
**12. Enhanced Output with Confidence Scoring (Accuracy: +0.5-1%)**
155+
**15. Enhanced Output with Confidence Scoring (Accuracy: +0.5-1%)**
136156
```bash
137-
python examples/requirements_enhanced_output_demo.py
157+
python "examples/Requirements Extraction/requirements_enhanced_output_demo.py"
138158
```
139159
Advanced output structure with:
140160
- 4-component confidence scoring (0.0-1.0)
@@ -144,26 +164,6 @@ Advanced output structure with:
144164
- JSON serialization
145165
- Statistics and filtering
146166

147-
### Agent Examples
148-
149-
**13. Deep Agent**
150-
```bash
151-
python examples/deepagent_demo.py
152-
```
153-
Advanced agent with planning and execution capabilities.
154-
155-
**14. Configuration Loader**
156-
```bash
157-
python examples/config_loader_demo.py
158-
```
159-
Load and manage configuration files.
160-
161-
**15. Parser Demo**
162-
```bash
163-
python examples/parser_demo.py
164-
```
165-
Demonstrate various parsing capabilities.
166-
167167
## Requirements Extraction Pipeline Integration
168168

169169
To use the complete Task 7 pipeline (99-100% accuracy):
@@ -220,7 +220,7 @@ Before running examples:
220220
export PYTHONPATH=.
221221

222222
# Or prefix commands
223-
PYTHONPATH=. python examples/basic_completion.py
223+
PYTHONPATH=. python "examples/Core Features/basic_completion.py"
224224
```
225225

226226
## Configuration

0 commit comments

Comments
 (0)