The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
improved arxiv (#3495)
leo-gan6b28cbe05879
diff --git a/docs/modules/agents/tools/examples/arxiv.ipynb b/docs/modules/agents/tools/examples/arxiv.ipynbindex 91d13e959a..04b1cc4788 100644--- a/docs/modules/agents/tools/examples/arxiv.ipynb+++ b/docs/modules/agents/tools/examples/arxiv.ipynb@@ -40,15 +40,19 @@]},{- "cell_type": "code",- "execution_count": 3,- "id": "2a50dd27",- "metadata": {- "tags": []- },- "outputs": [],+ "cell_type": "markdown",+ "id": "c89c110c-96ac-4fe1-ba3e-6056543d1a59",+ "metadata": {},"source": [- "arxiv = ArxivAPIWrapper()"+ "Run a query to get information about some `scientific article`/articles. The query text is limited to 300 characters.\n",+ "\n",+ "It returns these article fields:\n",+ "- Publishing date\n",+ "- Title\n",+ "- Authors\n",+ "- Summary\n",+ "\n",+ "Next query returns information about one article with arxiv Id equal \"1605.08386\". "]},{@@ -75,6 +79,16 @@"docs"]},+ {+ "cell_type": "markdown",+ "id": "840f70c9-8f80-4680-bb38-46198e931bcf",+ "metadata": {},+ "source": [+ "Now, we want to get information about one author, `Caprice Stanley`.\n",+ "\n",+ "This query returns information about three articles. By default, query returns information only about three top articles."+ ]+ },{"cell_type": "code","execution_count": 5,@@ -99,6 +113,14 @@"docs"]},+ {+ "cell_type": "markdown",+ "id": "2d9b6292-a47d-4f99-9827-8e9f244bf887",+ "metadata": {},+ "source": [+ "Now, we are trying to find information about non-existing article. In this case, the response is \"No good Arxiv Result was found\""+ ]+ },{"cell_type": "code","execution_count": 6,@@ -122,14 +144,6 @@"docs = arxiv.run(\"1605.08386WWW\")\n","docs"]- },- {- "cell_type": "code",- "execution_count": null,- "id": "4f4e9602",- "metadata": {},- "outputs": [],- "source": []}],"metadata": {@@ -148,7 +162,7 @@"name": "python","nbconvert_exporter": "python","pygments_lexer": "ipython3",- "version": "3.9.1"+ "version": "3.10.6"}},"nbformat": 4,diff --git a/langchain/tools/arxiv/tool.py b/langchain/tools/arxiv/tool.pyindex 2c117c8a87..83c211311e 100644--- a/langchain/tools/arxiv/tool.py+++ b/langchain/tools/arxiv/tool.py@@ -9,8 +9,11 @@ class ArxivQueryRun(BaseTool):name = "Arxiv"description = (- "A wrapper around Arxiv. "- "Useful for getting summary of articles from arxiv.org. "+ "A wrapper around Arxiv.org "+ "Useful for when you need to answer questions about Physics, Mathematics, "+ "Computer Science, Quantitative Biology, Quantitative Finance, Statistics, "+ "Electrical Engineering, and Economics "+ "from scientific articles on arxiv.org. ""Input should be a search query.")api_wrapper: ArxivAPIWrapper