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

Change default Metaphor search example to use prompt optimizer #8890

Merged
merged 4 commits into from
Aug 8, 2023

Conversation

jeffzwang
Copy link
Contributor

  • fix install command
  • change example notebook to use Metaphor autoprompt by default

@vercel
Copy link

vercel bot commented Aug 7, 2023

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

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 8, 2023 0:22am

@dosubot dosubot bot added the 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder label Aug 7, 2023
"metadata": {},
"outputs": [],
"source": [
"@tool\n",
"def search(query: str):\n",
" \"\"\"Call search engine with a query.\"\"\"\n",
" return client.search(query)\n",
" \"\"\"Call search engine with a query. Use autoprompt by default to convert query to a Metaphor query.\"\"\"\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

i actually think its BAD to put this in the docstring - the agent sees this docstring and this isnt a super relevant fact and could distract from the true parameters

Could add that note in a comment

speaking of, may be good to add a comment about docstrings mattering haha

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes good point - I haven't played with this tool decorator syntax before, but obviously makes sense why that is the case. I guess I would like to have one comment that is the docstring and another that describes what the docstring does haha.

@hwchase17 hwchase17 merged commit ff44fe4 into langchain-ai:master Aug 8, 2023
3 checks passed
@jeffzwang jeffzwang deleted the jw-metaphor-patch2 branch August 8, 2023 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants