Lucas ARRIESSE commited on
Commit Β·
0925e1c
1
Parent(s): be704f8
Sort prompts + add doc for prompts
Browse filesFiles changed (10)
- api/requirements.py+1-1
- api/solutions.py+4-4
- prompts/private/README+8-1
- prompts/public/README.mdAdded+9
- prompts/bootstrap_solution.txt β prompts/public/bootstrap_solution.txtRenamed
- prompts/classify.txt β prompts/public/classify.txtRenamed
- prompts/criticize.txt β prompts/public/criticize.txtRenamed
- prompts/format_requirements.txt β prompts/public/format_requirements.txtRenamed
- prompts/refine_solution.txt β prompts/public/refine_solution.txtRenamed
- prompts/structure_solution.txtDeleted-12
45 unmodified lines4647484950515245 unmodified linesmessages = []# categorize the requirements using their indicesreq_prompt = await prompt_env.get_template("classify.txt").render_async(**{"requirements": [rq.model_dump() for rq in params.requirements],"max_n_categories": params.max_n_categories,"response_schema": _ReqGroupingOutput.model_json_schema()})45 unmodified lines4647484950515245 unmodified linesmessages = []# categorize the requirements using their indicesreq_prompt = await prompt_env.get_template("public/classify.txt").render_async(**{"requirements": [rq.model_dump() for rq in params.requirements],"max_n_categories": params.max_n_categories,"response_schema": _ReqGroupingOutput.model_json_schema()})
44 unmodified lines4546474849505114 unmodified lines6667686970717230 unmodified lines10310410510610710810921 unmodified lines13113213313413513613744 unmodified linesfmt_completion = await llm_router.acompletion("gemini-v2", messages=[{"role": "user","content": await prompt_env.get_template("format_requirements.txt").render_async(**{"category": cat.model_dump(),"response_schema": InsightFinderConstraintsList.model_json_schema()})14 unmodified linesformat_solution = await llm_router.acompletion("gemini-v2", messages=[{"role": "user","content": await prompt_env.get_template("bootstrap_solution.txt").render_async(**{"category": cat.model_dump(),"technologies": technologies.model_dump()["technologies"],"user_constraints": req.user_constraints,30 unmodified lines"""Criticize the challenges, weaknesses and limitations of the provided solutions."""async def __criticize_single(solution: SolutionModel):req_prompt = await prompt_env.get_template("criticize.txt").render_async(**{"solutions": [solution.model_dump()],"response_schema": _SolutionCriticismOutput.model_json_schema()})21 unmodified lines"""Refines the previously critiqued solutions."""async def __refine_solution(crit: SolutionCriticism):req_prompt = await prompt_env.get_template("refine_solution.txt").render_async(**{"solution": crit.solution.model_dump(),"criticism": crit.criticism,"response_schema": _RefinedSolutionModel.model_json_schema(),44 unmodified lines4546474849505114 unmodified lines6667686970717230 unmodified lines10310410510610710810921 unmodified lines13113213313413513613744 unmodified linesfmt_completion = await llm_router.acompletion("gemini-v2", messages=[{"role": "user","content": await prompt_env.get_template("public/format_requirements.txt").render_async(**{"category": cat.model_dump(),"response_schema": InsightFinderConstraintsList.model_json_schema()})14 unmodified linesformat_solution = await llm_router.acompletion("gemini-v2", messages=[{"role": "user","content": await prompt_env.get_template("public/bootstrap_solution.txt").render_async(**{"category": cat.model_dump(),"technologies": technologies.model_dump()["technologies"],"user_constraints": req.user_constraints,30 unmodified lines"""Criticize the challenges, weaknesses and limitations of the provided solutions."""async def __criticize_single(solution: SolutionModel):req_prompt = await prompt_env.get_template("public/criticize.txt").render_async(**{"solutions": [solution.model_dump()],"response_schema": _SolutionCriticismOutput.model_json_schema()})21 unmodified lines"""Refines the previously critiqued solutions."""async def __refine_solution(crit: SolutionCriticism):req_prompt = await prompt_env.get_template("public/refine_solution.txt").render_async(**{"solution": crit.solution.model_dump(),"criticism": crit.criticism,"response_schema": _RefinedSolutionModel.model_json_schema(),
1Prompts for client-side inference (in `private/`) should only use basic variable templating.12345678>**!!WARNING!!**: Prompts for client-side inference (in `private/`) should only use basic variable templating.## List of client-side prompts used for assessment using private LLM- `assess` : Prompt for assessing the user idea- `extract` : Prompt for extracting information from the LLM assessment in a structured way- `refine` : Prompt for refining the user idea with supplied insights- `fto_topics` : Retrieves from a user idea the topics to look up for FTO analysis- `fto_assess` : Assess the FTO analysis results
123456789
## List of public prompts- `format_requirements`: Glue prompt for extracting most important constraints to retrieve relevant technologies- `bootstrap_solution` : Boostrap a solution from a list of technologies- `structure_solution` : Format a bootstrapped solution into a structured outptut- `criticize`: Criticize a boostraped solution for refinement- `refine_solution` : Refines a boostrapped solution using critics- `classify` : Categorize requirements into sections- 123456789101112<role>You are an expert system designer</role><task>Your task is to take a solution you've created previously and structure it into a JSON object.</task>
Here is the solution<solution>{{solution}}</solution>
<response_format>Reply in JSON using the following schema:{{response_schema}}</response_format> api/requirements.py+1-1
api/solutions.py+4-4
prompts/private/README+8-1
prompts/public/README.mdAdded+9
prompts/bootstrap_solution.txt β prompts/public/bootstrap_solution.txtRenamed
prompts/classify.txt β prompts/public/classify.txtRenamed
prompts/criticize.txt β prompts/public/criticize.txtRenamed
prompts/format_requirements.txt β prompts/public/format_requirements.txtRenamed
prompts/refine_solution.txt β prompts/public/refine_solution.txtRenamed
prompts/structure_solution.txtDeleted-12