diff --git a/notebooks/llms/llamaindex/llamaindex_agent_openai_assistant_with_milvus.ipynb b/notebooks/llms/llamaindex/llamaindex_agent_openai_assistant_with_milvus.ipynb index 85cb13f39..ada7b6f3f 100644 --- a/notebooks/llms/llamaindex/llamaindex_agent_openai_assistant_with_milvus.ipynb +++ b/notebooks/llms/llamaindex/llamaindex_agent_openai_assistant_with_milvus.ipynb @@ -48,7 +48,6 @@ "source": [ "from milvus import default_server\n", "\n", - "\n", "# default_server.cleanup() # Optional, run this line if you want to cleanup previous data\n", "default_server.start()" ] @@ -69,25 +68,7 @@ "execution_count": 3, "id": "dbecdfda", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "--2023-11-16 14:40:44-- https://raw.githubusercontent.com/run-llama/llama_index/main/docs/examples/data/10k/uber_2021.pdf\n", - "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.108.133, ...\n", - "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.\n", - "HTTP request sent, awaiting response... 200 OK\n", - "Length: 1880483 (1.8M) [application/octet-stream]\n", - "Saving to: ‘uber_2021.pdf’\n", - "\n", - "uber_2021.pdf 100%[===================>] 1.79M 26.1KB/s in 23s \n", - "\n", - "2023-11-16 14:41:08 (79.9 KB/s) - ‘uber_2021.pdf’ saved [1880483/1880483]\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "! wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/examples/data/10k/uber_2021.pdf' -O 'uber_2021.pdf'" ] @@ -157,7 +138,7 @@ "\n", "llm = OpenAI(model='gpt-4-1106-preview')\n", "embed_model = HuggingFaceEmbedding(model_name='BAAI/bge-small-en', cache_folder='./tmp/models', device='cpu')\n", - "service_context = ServiceContext.from_defaults(llm=llm, embed_model=embed_model, chunk_size=512)\n", + "service_context = ServiceContext.from_defaults(llm=llm, embed_model=embed_model, chunk_size=350)\n", "\n", "vector_store = MilvusVectorStore(\n", " uri=f'http://localhost:{default_server.listen_port}',\n", @@ -272,30 +253,35 @@ "output_type": "stream", "text": [ "=== Calling Function ===\n", - "Calling function: CustomRetriever with args: {\"input\":\"Uber's revenue growth in 2021\"}\n", - "Got output: page_label = 57\n", + "Calling function: CustomRetriever with args: {\"input\":\"Uber Technologies, Inc. annual revenue growth 2021\"}\n", + "Got output: page_label = 77\n", "file_name = uber_2021.pdf\n", "file_path = uber_2021.pdf\n", - "The following table sets forth the components of our consolidated statements of operations for each of the periods presented as a percentage of revenue : Year Ended December 31,\n", - "2020\n", - "2021 Revenue\n", - "100 %100 %Costs and expenses\n", + "UBER TECHNOLOGIES, INC.CONSOLIDATED STATEMENTS OF\n", + " OPERATIONS(In millions, except share amounts which are ref\n", + "lected in thousands, and per share amounts)Year Ended December 31,\n", + "2019\n", + "2020 2021 Revenue\n", + "$ 13,000 $ 11,139 $ 17,455 Costs and expenses\n", "Cost of revenue, exclusive of dep\n", - "reciation and amortization shown separately below46 %54 %Operations and support\n", - "16 %11 %Sales and marketing\n", - "32 %27 %Research and development\n", - "20 %12 %General and administrative\n", - "24 %13 %Depreciation and amortization\n", - "5 %5 %Total costs and expenses\n", - "144 %122 %Loss from operations\n", - "(44) %(22) %Interest expense\n", - "(4) %(3) %Other income (expense), net\n", - "(15) %19 %Loss before income taxes and loss from equity me\n", - "thod investments(62) %(6) %Provision for (benefit fro\n", - "m) income taxes(2) %(3) %Loss from equity method invest\n", - "ments— %— %Net loss including non-controlling interests\n", - "(61) %(3) %Less: net loss attributab\n", - "le to non-controlling interests, net of tax— %— %Net loss attributable to Uber Technologies, Inc.\n", + "reciation and amortization shown separately below6,061 5,154 9,351 Operations and support\n", + "2,302 1,819 1,877 Sales and marketing\n", + "4,626 3,583 4,789 Research and development\n", + "4,836 2,205 2,054 General and administrative\n", + "3,299 2,666 2,316 Depreciation and amortization\n", + "472 575 902 Total costs and expenses\n", + "21,596 16,002 21,289 Loss from operations\n", + "(8,596) (4,863) (3,834) Interest expense\n", + "(559) (458) (483) Other income (expense), net\n", + "722 (1,625) 3,292 Loss before income taxes and loss from equity me\n", + "thod investments(8,433) (6,946) (1,025) Provision for (benefit fro\n", + "m) income taxes45 (192) (492) Loss from equity method invest\n", + "ments(34) (34) (37) Net loss including non-controlling interests\n", + "(8,512) (6,\n", + "\n", + "page_label = 57\n", + "file_name = uber_2021.pdf\n", + "file_path = uber_2021.pdf\n", "(61) %(3) % Totals of percentage of \n", "revenues may not foot due to rounding.Comparison of the Years Ended December 31, 2020 and 2021\n", "Revenue\n", @@ -307,61 +293,37 @@ " increased $6.3 billion, or 57%, primarily attributable to an increase in Gross Bookings of 56%, or 53% on a constant currency basis. The increase inGross\n", " Bookings was primarily driven by an increase in Delivery Gross Bookings of 71%, or 66% on a constant currency basis, due to an increase in food deliveryorders\n", " and higher basket sizes as a result of stay-at-home order demand related to COVID-19, as well as continued expansion across U.S. and internationalmarkets.\n", + " The increase was also driven by Mobility Gross Bookings growth of 38%, or 36% on a constant currency basis, due to increases in Trip volumes as thebusiness\n", + " recovers from the impacts of COVID-19.\n", "\n", - "page_label = 53\n", + "page_label = 82\n", "file_name = uber_2021.pdf\n", "file_path = uber_2021.pdf\n", - "Mobility Gross Bookings g\n", - "rew 36%, on a constant currency basis, from 2020, due to increases in Trip volumes as the business recovers from theimpacts of COVID-19.\n", - "Revenue\n", - " was $17.5 billion, or up 57% year-over-year, reflecting the overall growth in our Delivery business and an increase in Freight revenue attributable tothe\n", - " acquisition of Transplace in the fourth quarter of 2021 as well as growth in the number of shippers and carriers on the network combined with an increase involumes with our top shippers.\n", - "Net\n", - " loss attributable to Uber Technologies, Inc. was $496 million, a 93% improvement year-over-year, driven by a $1.6 billion pre-tax gain on the sale of ourATG\n", - " Business to Aurora, a $1.6 billion pre-tax net benefit relating to Uber’s equity investments, as well as reductions in our fixed cost structure and increasedvariable cost effi\n", - "ciencies. Net loss attributable to Uber Technologies, Inc. also included $1.2 billion of stock-based compensation expense.Adjusted\n", - " EBITDA loss was $774 million, improving $1.8 billion from 2020 with Mobility Adjusted EBITDA profit of $1.6 billion. Additionally, DeliveryAdjusted\n", - " EBITDA loss of $348 million, improved $525 million and Delivery Adjusted EBITDA margin as a percentage of Delivery Gross Bookings improved to(0.7)% from (2.9)%, compa\n", - "red to 2020.We ended the year with $4.3 bil\n", - "lion in cash and cash equivalents.Other Developments for 2021\n", - "Acquisitions\n", - "Remaining Interests in Cornershop\n", - "In\n", - " August 2021, we completed the acquisition of the remaining 45% ownership interest in Cornershop Cayman (“Cornershop”), or 47%, on a fully-dilutedbasis, in an all-stock tr\n", - "ansaction.Drizly\n", - "On\n", - " October 12, 2021, we completed the acquisition of 100% ownership interest in The Drizly Group, Inc. (“Drizly”), an on-demand alcohol marketplace inNorth America, allowing us to expand \n", - "alcohol offerings in our Delivery business.\n", - "\n", - "page_label = 98\n", - "file_name = uber_2021.pdf\n", - "file_path = uber_2021.pdf\n", - "Note 2 – RevenueThe\n", - " following tables present our revenues disaggregated by offering and geographical region. Revenue by geographical region is based on where thetransaction\n", - " occurred. This level of disaggregation takes into consideration how the nature, amount, timing, and uncertainty of revenue and cash flows are affectedby economic factors. Revenue \n", - "is presented in the following tables for the years ended December 31, 2019, 2020 and 2021, respectively (in millions):Year Ended December 31,\n", - "2019\n", - "2020 2021 Mobility revenue \n", - "$ 10,707 $ 6,089 $ 6,953 Delivery revenue \n", - "1,401 3,904 8,362 Freight revenue\n", - "731 1,011 2,132 All Other revenue\n", - "161 135 8 Total revenue\n", - "$ 13,000 $ 11,139 $ 17,455 We\n", - " offer subscription memberships to end-users including Uber One, Uber Pass, Rides Pass, and Eats Pass (“Subscription”). We recognize Subscriptionfees\n", - " ratably over the life of the pass. We allocate Subscription fees earned to Mobility and Delivery revenue on a proportional basis, based on usage for eachoffering during the respe\n", - "ctive period.Year Ended December 31,\n", + "UBER TECHNOLOGIES, INC.CONSOLIDATED STATEMENTS OF\n", + " CASH FLOWS(In millions)\n", + "Year Ended December 31,\n", "2019\n", - "2020 2021 United States and Canada\n", - "$ 8,465 $ 6,611 $ 10,094 Latin America (\"LatAm\")\n", - "1,862 1,295 1,417 Europe, Middle East and Africa \n", - "(\"EMEA\")1,852 2,086 3,213 Asia Pacific (\"APAC\")\n", - "821 1,147 2,731 Total revenue\n", - "$ 13,000 $ 11,139 $ 17,455 Revenue\n", - "Mobility Revenue\n", - "We derive\n", - " revenue primarily from fees paid by Mobility Drivers for the use of our platform(s) and related services to facilitate and complete Mobility servicesand,\n", - " in certain markets, revenue from fees paid by end-users for connection services obtained via the platform. Mobility revenue also includes immaterial revenuestreams\n", - " such as our financial partnerships products and Vehicle Solutions. Vehicle Solutions revenue is accounted for as an operating lease as defined under ASC842.\n", + "2020 2021 Cash flows from operating activities\n", + "Net loss including non-controll\n", + "ing interests$ (8,512) $ (6,788) $ (570) Adjustments to reconcile n\n", + "et loss to net cash used in operating activities:Depreciation and amortization\n", + "472 575 902 Bad debt expense\n", + "92 76 109 Stock-based compensation\n", + "4,596 827 1,168 Gain on extinguishment of conver\n", + "tible notes and settlement of derivatives(444) — — Gain from sale of investm\n", + "ents— — (413) Gain on business divestitures, net\n", + "— (204) (1,684) Deferred income taxes\n", + "(88) (266) (692) Impairment of debt and \n", + "equity securities— 1,690 — Impairments of goodwill, long\n", + "-lived assets and other assets— 404 116 Loss from equity method invest\n", + "ments34 34 37 Unrealized (gain) loss on deb\n", + "t and equity securities, net(2) 125 (1,142) Unrealized foreign cur\n", + "rency transactions16 48 38 Other\n", + "15 2 4 Change in assets and liabili\n", + "ties, net of impact of business acquisitions and disposals:Accounts receivable\n", + "(407) 142 (597) Prepaid expenses and other asse\n", + "ts(478) 94 (236) Collateral held by insurer\n", + "(1,\n", "\n", "\n", "========================\n" @@ -391,7 +353,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Uber's revenue grew by 57% in 2021. The total revenue for the year was $17.455 billion, up from $11.139 billion in 2020.\n" + "Uber's revenue growth in 2021 was 57 percent compared to 2020, with revenue increasing from $11,139 million in 2020 to $17,455 million in 2021.\n" ] } ], @@ -399,46 +361,19 @@ "print(str(response))" ] }, - { - "cell_type": "markdown", - "id": "7e802f37", - "metadata": {}, - "source": [ - "Furthermore, take a look at the references of its answer:" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "1287a90a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[ToolOutput(content='page_label = 57\\nfile_name = uber_2021.pdf\\nfile_path = uber_2021.pdf\\nThe following table sets forth the components of our consolidated statements of operations for each of the periods presented as a percentage of revenue : Year Ended December 31,\\n2020\\n2021 Revenue\\n100 %100 %Costs and expenses\\nCost of revenue, exclusive of dep\\nreciation and amortization shown separately below46 %54 %Operations and support\\n16 %11 %Sales and marketing\\n32 %27 %Research and development\\n20 %12 %General and administrative\\n24 %13 %Depreciation and amortization\\n5 %5 %Total costs and expenses\\n144 %122 %Loss from operations\\n(44) %(22) %Interest expense\\n(4) %(3) %Other income (expense), net\\n(15) %19 %Loss before income taxes and loss from equity me\\nthod investments(62) %(6) %Provision for (benefit fro\\nm) income taxes(2) %(3) %Loss from equity method invest\\nments— %— %Net loss including non-controlling interests\\n(61) %(3) %Less: net loss attributab\\nle to non-controlling interests, net of tax— %— %Net loss attributable to Uber Technologies, Inc.\\n(61) %(3) % Totals of percentage of \\nrevenues may not foot due to rounding.Comparison of the Years Ended December 31, 2020 and 2021\\nRevenue\\nYear Ended December 31,\\n2020 to 2021 % Change\\n(In millions, except percentages) 2020 2021 Revenue\\n$ 11,139 $ 17,455 57 %2021\\n Compared to 2020Revenue\\n increased $6.3 billion, or 57%, primarily attributable to an increase in Gross Bookings of 56%, or 53% on a constant currency basis. The increase inGross\\n Bookings was primarily driven by an increase in Delivery Gross Bookings of 71%, or 66% on a constant currency basis, due to an increase in food deliveryorders\\n and higher basket sizes as a result of stay-at-home order demand related to COVID-19, as well as continued expansion across U.S. and internationalmarkets.\\n\\npage_label = 53\\nfile_name = uber_2021.pdf\\nfile_path = uber_2021.pdf\\nMobility Gross Bookings g\\nrew 36%, on a constant currency basis, from 2020, due to increases in Trip volumes as the business recovers from theimpacts of COVID-19.\\nRevenue\\n was $17.5 billion, or up 57% year-over-year, reflecting the overall growth in our Delivery business and an increase in Freight revenue attributable tothe\\n acquisition of Transplace in the fourth quarter of 2021 as well as growth in the number of shippers and carriers on the network combined with an increase involumes with our top shippers.\\nNet\\n loss attributable to Uber Technologies, Inc. was $496 million, a 93% improvement year-over-year, driven by a $1.6 billion pre-tax gain on the sale of ourATG\\n Business to Aurora, a $1.6 billion pre-tax net benefit relating to Uber’s equity investments, as well as reductions in our fixed cost structure and increasedvariable cost effi\\nciencies. Net loss attributable to Uber Technologies, Inc. also included $1.2 billion of stock-based compensation expense.Adjusted\\n EBITDA loss was $774 million, improving $1.8 billion from 2020 with Mobility Adjusted EBITDA profit of $1.6 billion. Additionally, DeliveryAdjusted\\n EBITDA loss of $348 million, improved $525 million and Delivery Adjusted EBITDA margin as a percentage of Delivery Gross Bookings improved to(0.7)% from (2.9)%, compa\\nred to 2020.We ended the year with $4.3 bil\\nlion in cash and cash equivalents.Other Developments for 2021\\nAcquisitions\\nRemaining Interests in Cornershop\\nIn\\n August 2021, we completed the acquisition of the remaining 45% ownership interest in Cornershop Cayman (“Cornershop”), or 47%, on a fully-dilutedbasis, in an all-stock tr\\nansaction.Drizly\\nOn\\n October 12, 2021, we completed the acquisition of 100% ownership interest in The Drizly Group, Inc. (“Drizly”), an on-demand alcohol marketplace inNorth America, allowing us to expand \\nalcohol offerings in our Delivery business.\\n\\npage_label = 98\\nfile_name = uber_2021.pdf\\nfile_path = uber_2021.pdf\\nNote 2 – RevenueThe\\n following tables present our revenues disaggregated by offering and geographical region. Revenue by geographical region is based on where thetransaction\\n occurred. This level of disaggregation takes into consideration how the nature, amount, timing, and uncertainty of revenue and cash flows are affectedby economic factors. Revenue \\nis presented in the following tables for the years ended December 31, 2019, 2020 and 2021, respectively (in millions):Year Ended December 31,\\n2019\\n2020 2021 Mobility revenue \\n$ 10,707 $ 6,089 $ 6,953 Delivery revenue \\n1,401 3,904 8,362 Freight revenue\\n731 1,011 2,132 All Other revenue\\n161 135 8 Total revenue\\n$ 13,000 $ 11,139 $ 17,455 We\\n offer subscription memberships to end-users including Uber One, Uber Pass, Rides Pass, and Eats Pass (“Subscription”). We recognize Subscriptionfees\\n ratably over the life of the pass. We allocate Subscription fees earned to Mobility and Delivery revenue on a proportional basis, based on usage for eachoffering during the respe\\nctive period.Year Ended December 31,\\n2019\\n2020 2021 United States and Canada\\n$ 8,465 $ 6,611 $ 10,094 Latin America (\"LatAm\")\\n1,862 1,295 1,417 Europe, Middle East and Africa \\n(\"EMEA\")1,852 2,086 3,213 Asia Pacific (\"APAC\")\\n821 1,147 2,731 Total revenue\\n$ 13,000 $ 11,139 $ 17,455 Revenue\\nMobility Revenue\\nWe derive\\n revenue primarily from fees paid by Mobility Drivers for the use of our platform(s) and related services to facilitate and complete Mobility servicesand,\\n in certain markets, revenue from fees paid by end-users for connection services obtained via the platform. Mobility revenue also includes immaterial revenuestreams\\n such as our financial partnerships products and Vehicle Solutions. Vehicle Solutions revenue is accounted for as an operating lease as defined under ASC842.\\n\\n', tool_name='CustomRetriever', raw_input={'input': >}, raw_output=[NodeWithScore(node=TextNode(id_='09551bda-df2f-4a3a-9749-67c336b55143', embedding=None, metadata={'page_label': '57', 'file_name': 'uber_2021.pdf', 'file_path': 'uber_2021.pdf', 'creation_date': '2023-11-16', 'last_modified_date': '2023-11-16', 'last_accessed_date': '2023-11-16'}, excluded_embed_metadata_keys=['creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='f28843b4-e671-4bf0-97b6-66d141e36828', node_type=, metadata={'page_label': '57', 'file_name': 'uber_2021.pdf', 'file_path': 'uber_2021.pdf', 'creation_date': '2023-11-16', 'last_modified_date': '2023-11-16', 'last_accessed_date': '2023-11-16'}, hash='6b921fc45ca57f6580fc228f560a55000000bd9d0c0a135b7e176c5c72b7d9d7'), : RelatedNodeInfo(node_id='e9b325ae-4eba-4bfa-939a-8428f75fa47e', node_type=, metadata={'page_label': '57', 'file_name': 'uber_2021.pdf', 'file_path': 'uber_2021.pdf', 'creation_date': '2023-11-16', 'last_modified_date': '2023-11-16', 'last_accessed_date': '2023-11-16'}, hash='e4fafae2e66097c06da02c770d8a195e56ad7185f58e142961978eee539a367e')}, hash='040873569bbc5845452c57bb438c01773145917e2d5cc72d8fb78915a02a98d8', text='The following table sets forth the components of our consolidated statements of operations for each of the periods presented as a percentage of revenue : Year Ended December 31,\\n2020\\n2021 Revenue\\n100 %100 %Costs and expenses\\nCost of revenue, exclusive of dep\\nreciation and amortization shown separately below46 %54 %Operations and support\\n16 %11 %Sales and marketing\\n32 %27 %Research and development\\n20 %12 %General and administrative\\n24 %13 %Depreciation and amortization\\n5 %5 %Total costs and expenses\\n144 %122 %Loss from operations\\n(44) %(22) %Interest expense\\n(4) %(3) %Other income (expense), net\\n(15) %19 %Loss before income taxes and loss from equity me\\nthod investments(62) %(6) %Provision for (benefit fro\\nm) income taxes(2) %(3) %Loss from equity method invest\\nments— %— %Net loss including non-controlling interests\\n(61) %(3) %Less: net loss attributab\\nle to non-controlling interests, net of tax— %— %Net loss attributable to Uber Technologies, Inc.\\n(61) %(3) % Totals of percentage of \\nrevenues may not foot due to rounding.Comparison of the Years Ended December 31, 2020 and 2021\\nRevenue\\nYear Ended December 31,\\n2020 to 2021 % Change\\n(In millions, except percentages) 2020 2021 Revenue\\n$ 11,139 $ 17,455 57 %2021\\n Compared to 2020Revenue\\n increased $6.3 billion, or 57%, primarily attributable to an increase in Gross Bookings of 56%, or 53% on a constant currency basis. The increase inGross\\n Bookings was primarily driven by an increase in Delivery Gross Bookings of 71%, or 66% on a constant currency basis, due to an increase in food deliveryorders\\n and higher basket sizes as a result of stay-at-home order demand related to COVID-19, as well as continued expansion across U.S. and internationalmarkets.', start_char_idx=None, end_char_idx=None, text_template='{metadata_str}\\n\\n{content}', metadata_template='{key}: {value}', metadata_seperator='\\n'), score=0.9075453877449036), NodeWithScore(node=TextNode(id_='e1fc4a81-e0e0-413a-9eab-77b44a665e7f', embedding=None, metadata={'page_label': '53', 'file_name': 'uber_2021.pdf', 'file_path': 'uber_2021.pdf', 'creation_date': '2023-11-16', 'last_modified_date': '2023-11-16', 'last_accessed_date': '2023-11-16'}, excluded_embed_metadata_keys=['creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='b211a9de-e8b4-4d23-a26e-d4e1445b9239', node_type=, metadata={'page_label': '53', 'file_name': 'uber_2021.pdf', 'file_path': 'uber_2021.pdf', 'creation_date': '2023-11-16', 'last_modified_date': '2023-11-16', 'last_accessed_date': '2023-11-16'}, hash='c6b092b5866821f1aa739f7df96e0b39eccc24d4752280233835a8ae9b75d533'), : RelatedNodeInfo(node_id='b57b85be-a0dc-4c99-b12f-7aacc830076a', node_type=, metadata={'page_label': '53', 'file_name': 'uber_2021.pdf', 'file_path': 'uber_2021.pdf', 'creation_date': '2023-11-16', 'last_modified_date': '2023-11-16', 'last_accessed_date': '2023-11-16'}, hash='eea57768523f6c58b1e25f514f7713416ed8208a392071bc96d65a568529d408'), : RelatedNodeInfo(node_id='7a5dcee4-1676-4307-a074-476b8fa91ffc', node_type=, metadata={'page_label': '53', 'file_name': 'uber_2021.pdf', 'file_path': 'uber_2021.pdf', 'creation_date': '2023-11-16', 'last_modified_date': '2023-11-16', 'last_accessed_date': '2023-11-16'}, hash='f0797c9277294a0a98098982c60d89a162106ad5ab38c635f9bb9645ca3cba89')}, hash='08eab25a217eabd85377145f8dd4eff5752d1d1c915d2c76b712ffebfc17b32d', text='Mobility Gross Bookings g\\nrew 36%, on a constant currency basis, from 2020, due to increases in Trip volumes as the business recovers from theimpacts of COVID-19.\\nRevenue\\n was $17.5 billion, or up 57% year-over-year, reflecting the overall growth in our Delivery business and an increase in Freight revenue attributable tothe\\n acquisition of Transplace in the fourth quarter of 2021 as well as growth in the number of shippers and carriers on the network combined with an increase involumes with our top shippers.\\nNet\\n loss attributable to Uber Technologies, Inc. was $496 million, a 93% improvement year-over-year, driven by a $1.6 billion pre-tax gain on the sale of ourATG\\n Business to Aurora, a $1.6 billion pre-tax net benefit relating to Uber’s equity investments, as well as reductions in our fixed cost structure and increasedvariable cost effi\\nciencies. Net loss attributable to Uber Technologies, Inc. also included $1.2 billion of stock-based compensation expense.Adjusted\\n EBITDA loss was $774 million, improving $1.8 billion from 2020 with Mobility Adjusted EBITDA profit of $1.6 billion. Additionally, DeliveryAdjusted\\n EBITDA loss of $348 million, improved $525 million and Delivery Adjusted EBITDA margin as a percentage of Delivery Gross Bookings improved to(0.7)% from (2.9)%, compa\\nred to 2020.We ended the year with $4.3 bil\\nlion in cash and cash equivalents.Other Developments for 2021\\nAcquisitions\\nRemaining Interests in Cornershop\\nIn\\n August 2021, we completed the acquisition of the remaining 45% ownership interest in Cornershop Cayman (“Cornershop”), or 47%, on a fully-dilutedbasis, in an all-stock tr\\nansaction.Drizly\\nOn\\n October 12, 2021, we completed the acquisition of 100% ownership interest in The Drizly Group, Inc. (“Drizly”), an on-demand alcohol marketplace inNorth America, allowing us to expand \\nalcohol offerings in our Delivery business.', start_char_idx=None, end_char_idx=None, text_template='{metadata_str}\\n\\n{content}', metadata_template='{key}: {value}', metadata_seperator='\\n'), score=0.9060429334640503), NodeWithScore(node=TextNode(id_='a38bb893-6089-4f47-b999-7230a37d0f03', embedding=None, metadata={'page_label': '98', 'file_name': 'uber_2021.pdf', 'file_path': 'uber_2021.pdf', 'creation_date': '2023-11-16', 'last_modified_date': '2023-11-16', 'last_accessed_date': '2023-11-16'}, excluded_embed_metadata_keys=['creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='a759266c-bec4-4fb8-8081-c2e59c4c2072', node_type=, metadata={'page_label': '98', 'file_name': 'uber_2021.pdf', 'file_path': 'uber_2021.pdf', 'creation_date': '2023-11-16', 'last_modified_date': '2023-11-16', 'last_accessed_date': '2023-11-16'}, hash='441b3b3fc5ba93923511f76e0007e214672ad70971938a50d44c4860951fd317'), : RelatedNodeInfo(node_id='3444a681-6052-47b3-b155-26ba81e10fcf', node_type=, metadata={'page_label': '98', 'file_name': 'uber_2021.pdf', 'file_path': 'uber_2021.pdf', 'creation_date': '2023-11-16', 'last_modified_date': '2023-11-16', 'last_accessed_date': '2023-11-16'}, hash='8e04db55a525dfbf2632b2f248763fe41b0e66c6479909ed6b9e9683256bdc8c')}, hash='2ef1fa2070fbbf7454c45d4db09b57256c7ecc3d0e6bbb93d78a39b76a2d3b7a', text='Note 2 – RevenueThe\\n following tables present our revenues disaggregated by offering and geographical region. Revenue by geographical region is based on where thetransaction\\n occurred. This level of disaggregation takes into consideration how the nature, amount, timing, and uncertainty of revenue and cash flows are affectedby economic factors. Revenue \\nis presented in the following tables for the years ended December 31, 2019, 2020 and 2021, respectively (in millions):Year Ended December 31,\\n2019\\n2020 2021 Mobility revenue \\n$ 10,707 $ 6,089 $ 6,953 Delivery revenue \\n1,401 3,904 8,362 Freight revenue\\n731 1,011 2,132 All Other revenue\\n161 135 8 Total revenue\\n$ 13,000 $ 11,139 $ 17,455 We\\n offer subscription memberships to end-users including Uber One, Uber Pass, Rides Pass, and Eats Pass (“Subscription”). We recognize Subscriptionfees\\n ratably over the life of the pass. We allocate Subscription fees earned to Mobility and Delivery revenue on a proportional basis, based on usage for eachoffering during the respe\\nctive period.Year Ended December 31,\\n2019\\n2020 2021 United States and Canada\\n$ 8,465 $ 6,611 $ 10,094 Latin America (\"LatAm\")\\n1,862 1,295 1,417 Europe, Middle East and Africa \\n(\"EMEA\")1,852 2,086 3,213 Asia Pacific (\"APAC\")\\n821 1,147 2,731 Total revenue\\n$ 13,000 $ 11,139 $ 17,455 Revenue\\nMobility Revenue\\nWe derive\\n revenue primarily from fees paid by Mobility Drivers for the use of our platform(s) and related services to facilitate and complete Mobility servicesand,\\n in certain markets, revenue from fees paid by end-users for connection services obtained via the platform. Mobility revenue also includes immaterial revenuestreams\\n such as our financial partnerships products and Vehicle Solutions. Vehicle Solutions revenue is accounted for as an operating lease as defined under ASC842.', start_char_idx=None, end_char_idx=None, text_template='{metadata_str}\\n\\n{content}', metadata_template='{key}: {value}', metadata_seperator='\\n'), score=0.9027172923088074)])]" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "response.sources" - ] - }, { "cell_type": "markdown", "id": "fd183e6f", "metadata": {}, "source": [ - "> Optional: for Milvus-Lite, stop the service at the end." + "## Optional\n", + "\n", + "For Milvus-Lite, stop the service at the end." ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 11, "id": "4a32cd16", "metadata": {}, "outputs": [],