Skip to content

Commit beb8b29

Browse files
Added code generation documentation
1 parent 1ea753f commit beb8b29

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

docs/admin/setup/hyperion.rst

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,56 @@ Verifying the integration
7575
3. Run a consistency check to ensure the LLM call succeeds. Inspect the server logs for ``Hyperion`` entries
7676
if the request fails; misconfigured credentials and missing network egress are the most common causes.
7777

78-
Operational considerations
78+
Code Generation Process
79+
^^^^^^^^^^^^^^^^^^^^^^^
80+
81+
Hyperion can automatically generate complete programming exercise repositories (solution, template, and test code)
82+
using a structured AI-driven approach. The generation process consists of a 4-step pipeline with iterative
83+
improvement based on compilation feedback.
84+
85+
4-Step Generation Pipeline
86+
""""""""""""""""""""""""""
87+
88+
Each repository component follows a systematic generation process:
89+
90+
1. **Solution Planning**: Creates a high-level algorithmic approach and identifies key components needed
91+
2. **File Structure Definition**: Organizes the code into appropriate files and packages
92+
3. **Class and Method Headers**: Generates class definitions, method signatures, and documentation
93+
4. **Core Logic Implementation**: Produces the complete functional implementation
94+
95+
Iterative Compilation Feedback
96+
"""""""""""""""""""""""""""""""
97+
98+
For each repository component, Hyperion automatically:
99+
100+
- Generates code using the 4-step pipeline
101+
- Commits changes and triggers a CI build
102+
- Waits for compilation results
103+
- If compilation fails, uses build logs as feedback for the next iteration
104+
- Retries up to 3 times (default value) per component, incorporating error messages to improve the code
105+
- Stores the final generated code in the repository, even if compilation ultimately fails
106+
107+
This feedback loop enables Hyperion to self-correct common issues like syntax errors, missing imports,
108+
or incorrect API usage.
109+
110+
Cost Considerations
111+
"""""""""""""""""""
112+
113+
Average code generation costs depend on the LLM model and number of components (solution, template, or test repository):
114+
115+
**Per Component Costs** (with up to 3 iterations):
116+
117+
- **GPT-5**: ~$0.05 per repository component
118+
- **GPT-5-mini**: ~$0.01 per repository component
119+
120+
**Full Assignment Costs** (solution + template + test repositories):
121+
122+
- **GPT-5**: ~$0.15 total
123+
- **GPT-5-mini**: ~$0.03 total
124+
125+
*Note: Problem statement generation incurs additional costs and is billed separately.*
126+
127+
Operational considerations
79128
^^^^^^^^^^^^^^^^^^^^^^^^^^
80129

81130
- **Cost control:** Define usage policies and rate limits with your provider. Hyperion requests can process the

0 commit comments

Comments
 (0)