Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update evaluation tutorial #614

Merged
merged 7 commits into from
Jan 16, 2025
Merged

update evaluation tutorial #614

merged 7 commits into from
Jan 16, 2025

Conversation

isahers1
Copy link
Contributor

@isahers1 isahers1 commented Jan 8, 2025

No description provided.

Copy link

vercel bot commented Jan 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langsmith-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 3:00am

docs/evaluation/tutorials/evaluation.mdx Outdated Show resolved Hide resolved
docs/evaluation/tutorials/evaluation.mdx Outdated Show resolved Hide resolved
docs/evaluation/tutorials/evaluation.mdx Outdated Show resolved Hide resolved
def evaluate_length(run: Run, example: Example) -> dict:
prediction = run.outputs.get("output") or ""
required = example.outputs.get("answer") or ""
def evaluate_length(outputs: dict, reference_outputs: dict) -> dict:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we just call this something like is_concise() and return the bool directly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah going to call it "length" to match the key

docs/evaluation/tutorials/evaluation.mdx Outdated Show resolved Hide resolved
docs/evaluation/tutorials/evaluation.mdx Outdated Show resolved Hide resolved
docs/evaluation/tutorials/evaluation.mdx Outdated Show resolved Hide resolved
docs/evaluation/tutorials/evaluation.mdx Outdated Show resolved Hide resolved
docs/evaluation/tutorials/evaluation.mdx Outdated Show resolved Hide resolved
Comment on lines 207 to 215
# Note: If your system is async, you can use the asynchronous `aevaluate` function
# import asyncio
# from langsmith import aevaluate
#
# experiment_results = asyncio.run(aevaluate(
# experiment_results = asyncio.run(client.aevaluate(
# my_async_langsmith_app, # Your AI system
# data=dataset_name, # The data to predict and grade over
# evaluators=[evaluate_length, qa_evaluator], # The evaluators to score the results
# evaluators=[length, correctness], # The evaluators to score the results
# experiment_prefix="openai-3.5", # A prefix for your experiment names to easily identify them
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we delete this comment? dont think its needed in tutorial

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted, but would it be valuable to add a note about async compatibility somewhere? wouldn't want people turned away because they think we only do sync stuff.

docs/evaluation/tutorials/evaluation.mdx Outdated Show resolved Hide resolved
Comment on lines +158 to +159
def concision(outputs: dict, reference_outputs: dict) -> bool:
return int(len(outputs["response"]) < 2 * len(reference_outputs["answer"]))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The screenshots all say length so we would need to retake all of them if we want to use concision as the name.

@baskaryan baskaryan merged commit 98815a1 into main Jan 16, 2025
6 checks passed
@baskaryan baskaryan deleted the isaac/updateevaluationtutorial branch January 16, 2025 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants