Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions agents/3-llm-loop/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def run_all_evals(text, word_count_min=300, word_count_max=800, client_focus_min

return results

def generate_eval_report(profile_text: str) -> str:
def generate_eval_report(profile_text: str, results: dict) -> str:
"""
Generates a markdown-formatted prompt for an LLM to revise an Upwork profile,
with explicit strategies for word count and readability improvements.
Expand All @@ -127,8 +127,6 @@ def generate_eval_report(profile_text: str) -> str:
"""
status_emoji = {True: "✅ Passed", False: "❌ Failed"}

results = run_all_evals(profile_text)

notes = {
"word_count": {
True: "Your profile is within the ideal range of 300 words.",
Expand Down
4 changes: 2 additions & 2 deletions agents/3-llm-loop/llm-loop-copywriter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "c3937b9f-7fe7-41d4-8ac2-1a0e4582cafe",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -234,7 +234,7 @@
" print(results)\n",
"\n",
" # craft new prompt with feedback\n",
" prompt = generate_eval_report(new_profile)\n",
" prompt = generate_eval_report(new_profile, results)\n",
"\n",
" # check if all tests passed\n",
" all_passed = all(results.values())\n",
Expand Down