diff --git a/graphrag_comparison.ipynb b/graphrag_comparison.ipynb deleted file mode 100644 index dc2019d..0000000 --- a/graphrag_comparison.ipynb +++ /dev/null @@ -1,586 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Create Graph using text" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'\\n!pip install langchain-community neo4j wikipedia\\n!pip install langchain==0.2.5\\n!pip install langchain-experimental==0.0.61\\n!pip install langchain-openai==0.1.10\\n#!pip install dspy-ai\\n'" - ] - }, - "execution_count": 1, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "\n", - "!pip install langchain-community neo4j wikipedia\n", - "!pip install langchain==0.2.5\n", - "!pip install langchain-experimental==0.0.61\n", - "!pip install langchain-openai==0.1.10" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import openai\n", - "from langchain_community.document_loaders import WikipediaLoader\n", - "\n", - "from langchain_community.graphs import Neo4jGraph\n", - "from langchain_experimental.graph_transformers.llm import LLMGraphTransformer\n", - "from langchain_openai import AzureChatOpenAI\n", - "from azure.core.credentials import AzureKeyCredential\n", - "from azure.search.documents import SearchClient\n", - "from azure.search.documents.models import VectorizedQuery\n", - "\n", - "#OpenAI\n", - "#os.environ[\"OPENAI_API_KEY\"] = \"\"\n", - "azure_oai_key=os.getenv(\"AZURE_OPENAI_API_KEY\")\n", - "azure_oai_endpoint=os.getenv(\"AZURE_OPENAI_ENDPOINT\")\n", - "azure_oai_version=os.getenv(\"AZURE_OPENAI_API_VERSION\")\n", - "azure_oai_deployment=os.getenv(\"AZURE_OPENAI_MODEL\")\n", - "azure_embedding=os.getenv(\"EMBEDDING_MODEL_NAME\")\n", - "\n", - "#Search \n", - "azure_search_key=os.getenv(\"AZURE_SEARCH_API_KEY\")\n", - "azure_search_endpoint=os.getenv(\"AZURE_SEARCH_ENDPOINT\")\n", - "azure_search_index=os.getenv(\"AZURE_SEARCH_INDEX\")\n", - "\n", - "#Neo4j\n", - "neo4j_uri=os.getenv(\"NEO4J_URI\")\n", - "neo4j_database=os.getenv(\"NEO4J_DATABASE\")\n", - "neo4j_username=os.getenv(\"NEO4J_USERNAME\")\n", - "neo4j_password=os.getenv(\"NEO4J_PASSWORD\")" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "# the database name to connect to\n", - "graph = Neo4jGraph(url=neo4j_uri, username=neo4j_username, password=neo4j_password, database=neo4j_database)\n", - "llm = AzureChatOpenAI(azure_endpoint=azure_oai_endpoint, openai_api_version=azure_oai_version, openai_api_key=azure_oai_key,\n", - " azure_deployment=azure_oai_deployment)\n", - "llm_transformer = LLMGraphTransformer(llm=llm)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Wiki to Graph" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "c:\\Users\\yanivvaknin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\wikipedia\\wikipedia.py:389: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system (\"lxml\"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.\n", - "\n", - "The code that caused this warning is on line 389 of the file c:\\Users\\yanivvaknin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\wikipedia\\wikipedia.py. To get rid of this warning, pass the additional argument 'features=\"lxml\"' to the BeautifulSoup constructor.\n", - "\n", - " lis = BeautifulSoup(html).find_all('li')\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[Document(page_content='Elon Reeve Musk (; born June 28, 1971) is a businessman and investor known for his key roles in space company SpaceX and automotive company Tesla, Inc. Other involvements include ownership of X Corp., formerly Twitter, and his role in the founding of The Boring Company, xAI, Neuralink and OpenAI. He is one of the wealthiest people in the world; as of July 2024, Forbes estimates his net worth to be US$221 billion.\\nMusk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother. Two years later, he matriculated at Queen\\'s University at Kingston in Canada. Musk later transferred to the University of Pennsylvania and received bachelor\\'s degrees in economics and physics. He moved to California in 1995 to attend Stanford University, but dropped out after two days and, with his brother Kimbal, co-founded online city guide software company Zip2. The startup was acquired by Compaq for $307 million in 1999. That same year, Musk co-founded X.com, a direct bank. X.com merged with Confinity in 2000 to form PayPal. In October 2002, eBay acquired PayPal for $1.5 billion. Using $100 million of the money he made from the sale of PayPal, Musk founded SpaceX, a spaceflight services company, in 2002. \\nIn 2004, Musk was an early investor in electric vehicle manufacturer Tesla Motors, Inc. (later Tesla, Inc.). He became the company\\'s chairman and product architect, assuming the position of CEO in 2008. In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy. In 2013, he proposed a hyperloop high-speed vactrain transportation system. In 2015, he co-founded OpenAI, a nonprofit artificial intelligence research company. The following year, Musk co-founded Neuralink—a neurotechnology company developing brain–computer interfaces—and The Boring Company, a tunnel construction company. In 2018, the U.S. Securities and Exchange Commission (SEC) sued Musk, alleging that he had falsely announced that he had secured funding for a private takeover of Tesla. To settle the case, Musk stepped down as the chairman of Tesla and paid a $20 million fine. In 2022, he acquired Twitter for $44 billion. He subsequently merged the company into newly created X Corp. and rebranded the service as X the following year. In March 2023, Musk founded xAI, an artificial intelligence company.\\nMusk has expressed views that have made him a polarizing figure. He has been criticized for making unscientific and misleading statements, including COVID-19 misinformation, promoting right-wing conspiracy theories, and \"endorsing\" antisemitic conspiracy theories, the latter of which he later apologized for. His ownership of Twitter has been similarly controversial, being marked by layoffs of large numbers of employees, an increase in hate speech, misinformation and disinformation posts on the website, and changes to Twitter Blue verification.\\n\\n\\n== Early life and education ==\\n\\n\\n=== Childhood and family ===\\nElon Reeve Musk was born on June 28, 1971, in Pretoria, South Africa\\'s administrative capital. He is of British and Pennsylvania Dutch ancestry. His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa. His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve. Elon has a younger brother, Kimbal, and a younger sister, Tosca. Elon has four paternal half-siblings.\\nThe family was wealthy during Elon\\'s youth. Despite both Musk and Errol previously stating that Errol was a part owner of a Zambian emerald mine, in 2023, Errol recounted that the deal he made was to receive \"a portion of the emeralds produced at three small mines.\" Errol was elected to the Pretoria City Council as a representative of', metadata={'title': 'Elon Musk', 'summary': 'Elon Reeve Musk (; born June 28, 1971) is a businessman and investor known for his key roles in space company SpaceX and automotive company Tesla, Inc. Other involvements include ownership of X Corp., formerly Twitter, and his role in the founding of The Boring Company, xAI, Neuralink and OpenAI. He is one of the wealthiest people in the world; as of July 2024, Forbes estimates his net worth to be US$221 billion.\\nMusk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother. Two years later, he matriculated at Queen\\'s University at Kingston in Canada. Musk later transferred to the University of Pennsylvania and received bachelor\\'s degrees in economics and physics. He moved to California in 1995 to attend Stanford University, but dropped out after two days and, with his brother Kimbal, co-founded online city guide software company Zip2. The startup was acquired by Compaq for $307 million in 1999. That same year, Musk co-founded X.com, a direct bank. X.com merged with Confinity in 2000 to form PayPal. In October 2002, eBay acquired PayPal for $1.5 billion. Using $100 million of the money he made from the sale of PayPal, Musk founded SpaceX, a spaceflight services company, in 2002. \\nIn 2004, Musk was an early investor in electric vehicle manufacturer Tesla Motors, Inc. (later Tesla, Inc.). He became the company\\'s chairman and product architect, assuming the position of CEO in 2008. In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy. In 2013, he proposed a hyperloop high-speed vactrain transportation system. In 2015, he co-founded OpenAI, a nonprofit artificial intelligence research company. The following year, Musk co-founded Neuralink—a neurotechnology company developing brain–computer interfaces—and The Boring Company, a tunnel construction company. In 2018, the U.S. Securities and Exchange Commission (SEC) sued Musk, alleging that he had falsely announced that he had secured funding for a private takeover of Tesla. To settle the case, Musk stepped down as the chairman of Tesla and paid a $20 million fine. In 2022, he acquired Twitter for $44 billion. He subsequently merged the company into newly created X Corp. and rebranded the service as X the following year. In March 2023, Musk founded xAI, an artificial intelligence company.\\nMusk has expressed views that have made him a polarizing figure. He has been criticized for making unscientific and misleading statements, including COVID-19 misinformation, promoting right-wing conspiracy theories, and \"endorsing\" antisemitic conspiracy theories, the latter of which he later apologized for. His ownership of Twitter has been similarly controversial, being marked by layoffs of large numbers of employees, an increase in hate speech, misinformation and disinformation posts on the website, and changes to Twitter Blue verification.', 'source': 'https://en.wikipedia.org/wiki/Elon_Musk'}), Document(page_content='Elon Musk made $175.8 million when PayPal was sold to eBay in October 2002. He was first listed on the Forbes Billionaires List in 2012, with a net worth of $2 billion. He is the founder, chairman, CEO, and CTO of SpaceX; angel investor, CEO, product architect, and former chairman of Tesla, Inc.; owner, executive chairman, and CTO of X Corp.; founder of the Boring Company and xAI; co-founder of Neuralink and OpenAI; and president of the Musk Foundation. He is one of the wealthiest people in the world, with an estimated net worth of US$191 billion as of April 2024, according to the Bloomberg Billionaires Index, and $182.6 billion according to Forbes, primarily from his ownership stakes in Tesla and SpaceX.\\n\\n\\n== Details ==\\nAt the start of 2020, Elon Musk had a net worth of $27 billion. By the end of the year his net worth had increased by $150 billion, mostly driven by his ownership of around 20% of Tesla stock. During this period, Musk\\'s net worth was often volatile. For example, it dropped $16.3 billion on September 8, the largest single-day plunge in Bloomberg Billionaires Index\\'s history at the time. In November of that year, Musk passed Facebook co-founder Mark Zuckerberg to become the third-richest person in the world; a week later he passed Microsoft co-founder Bill Gates to become the second-richest.\\nIn January 2021, Musk, with a net worth of $185 billion, surpassed Amazon founder Jeff Bezos to become the richest person in the world. Bezos reclaimed the top spot the following month. On September 27, 2021, after Tesla stock surged, Forbes announced that Musk had a net worth of over $200 billion, and was the richest person in the world. In November 2021, Musk became the first person to have a net worth of more than $300 billion.\\nOn December 30, 2022, it was reported that Musk had lost $200 billion from his net worth due to declining stock values in Tesla, becoming the first person in history to lose such a large sum of money. In January 2023, Musk was recognized by Guinness World Records for experiencing the \"largest loss of personal fortune in history\" with regards to his financial losses since November 2021, which Guinness quoted a Forbes estimate of $182 billion.\\nMusk\\'s personal wealth is managed by his family office called Excession LLC, formed in 2016 and run by Jared Birchall.\\n\\n\\n=== Sources of wealth ===\\nAround 75% of Musk\\'s wealth was derived from Tesla stock in November 2020, a proportion that fell to about 37% as of December 2022, after selling nearly $40 billion in company shares since late 2021. Musk does not receive a salary from Tesla; he agreed with the board in 2018 to a compensation plan that ties his personal earnings to Tesla\\'s valuation and revenue. The deal stipulated that Musk only received the compensation if Tesla reached certain market values. It was the largest such deal ever done between a CEO and a company board. In the first award, given in May 2020, he was eligible to purchase 1.69 million Tesla shares (about 1% of the company) at below-market prices, which was worth about $800 million.\\nThe above stock compensation deal was invalidated by the Delaware court due to Musk controlling Tesla and having massive influence on the directors, making the compensation decision a \"conflicted-controller transaction\" which is subject to court review in Delaware law to be judged for fairness. Tesla is trying to reinstate the payment package via new shareholders votes.\\nMusk paid $455 million in taxes on $1.52 billion of income between 2014 and 2018. According to ProPublica, Musk paid no federal income taxes in 2018. He stated his 2021 tax bill was estimated at $12 billion based on his sale of $14 billion worth of Tesla stock.\\nMusk has repeatedly described himself as \"cash poor\", and has \"professed to have little interest in the material trappings of wealth\". In May 2020, he pledged to sell almost all physical possessions. Musk has defended his wealth by saying he is accumulating resources for humanity\\'s outwar', metadata={'title': 'Wealth of Elon Musk', 'summary': 'Elon Musk made $175.8 million when PayPal was sold to eBay in October 2002. He was first listed on the Forbes Billionaires List in 2012, with a net worth of $2 billion. He is the founder, chairman, CEO, and CTO of SpaceX; angel investor, CEO, product architect, and former chairman of Tesla, Inc.; owner, executive chairman, and CTO of X Corp.; founder of the Boring Company and xAI; co-founder of Neuralink and OpenAI; and president of the Musk Foundation. He is one of the wealthiest people in the world, with an estimated net worth of US$191 billion as of April 2024, according to the Bloomberg Billionaires Index, and $182.6 billion according to Forbes, primarily from his ownership stakes in Tesla and SpaceX.\\n\\n', 'source': 'https://en.wikipedia.org/wiki/Wealth_of_Elon_Musk'}), Document(page_content='Elon Musk is the CEO or owner of multiple companies including Tesla, SpaceX, and X Corp, and has expressed many views on a wide variety of subjects, ranging from politics to science.\\nWithin the context of American politics, Musk has said he supported Barack Obama in 2008 and 2012, Hillary Clinton in 2016, and Joe Biden in 2020. In 2022, Musk said he would start voting for Republican Party candidates, with him showing support for Vivek Ramaswamy in the 2024 Republican presidential primaries. He has stated support for universal basic income, gun rights, freedom of speech, a tax on carbon emissions and opposes government subsidies. He is also a critic of illegal immigration and short-selling.\\nMusk has expressed concern about issues such as artificial intelligence (AI), climate change and population decline. He has also criticized COVID-19 lockdowns, public transportation, and labor unions. He has promoted conspiracy theories, and made controversial statements that have led to accusations of antisemitism, support of white pride and transphobia. His views on international relations, including on the China-Taiwan and Russia-Ukraine conflicts, have received mixed reactions.\\n\\n\\n== International relations ==\\n\\n\\n=== Bolivia ===\\nIn July 2020, Musk tweeted, \"We will coup whoever we want! Deal with it\" in response to a Twitter user who implied that the US government organized a coup (referring to the 2019 Bolivian political crisis) against Evo Morales for Musk to obtain lithium from Bolivia. Musk\\'s tweet caused controversy and was later deleted.\\n\\n\\n=== China ===\\nMusk has praised China and has been described as having a close relationship with the Chinese government, allowing access to its markets for Tesla. After Gigafactory Shanghai produced its first batch of vehicles, Musk thanked the Chinese government and Chinese people while criticizing the United States and its people.:\\u200a207–208\\u200a On the 100th anniversary of the founding of the Chinese Communist Party, Musk praised the state\\'s \"economic prosperity\". In 2022, Musk wrote an article for China Cyberspace, the official publication of Cyberspace Administration of China, which enforces Internet censorship in China. His writing the article was described as conflicting with his advocacy for free speech.\\n\\n\\n=== Russian invasion of Ukraine ===\\n\\nFollowing the Russian invasion of Ukraine, Musk floated a controversial proposal on Twitter in October 2022, arguing that Ukraine should permanently cede occupied territories (e.g. Crimea) to Russia, and that Ukraine should drop its bid to join NATO. The four-part proposal, posted as a Twitter poll, suggested new referendums under United Nations supervision on the annexation of Russia-occupied territories. The proposal was welcomed by the Russian government and denounced by Ukrainian President Volodymyr Zelenskyy as \"pro-Russia\", with officials noting that people who had been murdered or forcibly deported by Russia would be unable to vote.\\nMusk appeared to be \"transmitting a message\" for Russian President Vladimir Putin, according to foreign affairs specialist Fiona Hill. In Politico\\'s interview with Hill, she said that Musk\\'s suggestion that Kherson and Zaporizhzhia be up for negotiation, and that the water supply for Crimea be secured, was \"so specific that this clearly is a message from Putin\". Musk previously made a similar suggestion at a September event in Aspen, Colorado. Hill told Politico, \"Putin plays the egos of big men, gives them a sense that they can play a role. But in reality, they\\'re just direct transmitters of messages from Vladimir Putin\".\\nIn an email newsletter, Ian Bremmer, head of Eurasia Group, a political-risk consultancy, said that Musk told him that he had spoken directly with Putin, which Musk denied in a reply on Twitter. Musk claimed he had spoken to Putin only once 18 months prior, on a space-related subject matter. Bremmer later took to Twitter to say Musk had told him of the discussion with Putin two weeks earlier. Kremlin spok', metadata={'title': 'Views of Elon Musk', 'summary': 'Elon Musk is the CEO or owner of multiple companies including Tesla, SpaceX, and X Corp, and has expressed many views on a wide variety of subjects, ranging from politics to science.\\nWithin the context of American politics, Musk has said he supported Barack Obama in 2008 and 2012, Hillary Clinton in 2016, and Joe Biden in 2020. In 2022, Musk said he would start voting for Republican Party candidates, with him showing support for Vivek Ramaswamy in the 2024 Republican presidential primaries. He has stated support for universal basic income, gun rights, freedom of speech, a tax on carbon emissions and opposes government subsidies. He is also a critic of illegal immigration and short-selling.\\nMusk has expressed concern about issues such as artificial intelligence (AI), climate change and population decline. He has also criticized COVID-19 lockdowns, public transportation, and labor unions. He has promoted conspiracy theories, and made controversial statements that have led to accusations of antisemitism, support of white pride and transphobia. His views on international relations, including on the China-Taiwan and Russia-Ukraine conflicts, have received mixed reactions.', 'source': 'https://en.wikipedia.org/wiki/Views_of_Elon_Musk'}), Document(page_content='Elon Musk completed his acquisition of Twitter in October 2022; Musk acted as CEO of Twitter until June 2023 when he was succeeded by Linda Yaccarino. Under Musk, Twitter was rebranded to X. It is one of the top social media platforms and the seventh-most visited website in the world. Users can share posts containing text messages, images, and videos and interact with other users\\' content through likes and reposts. X offers additional features such as direct messaging, video and audio calling, bookmarks, lists, communities, a chatbot, and the social audio feature Spaces.\\nFounded in March 2006 by Jack Dorsey, Noah Glass, Biz Stone, and Evan Williams as Twitter, it underwent a rebranding in July 2023 after being acquired by Elon Musk in 2022. \\nNow operating as X, the platform closely resembles its predecessor but includes additional features such as long-form texts, account monetization options, audio-video calls, integration with xAI\\'s Grok chatbot, job search, and a verification process accessible to premium users. Several Twitter features have been removed from the site, including Circles, NFT profile pictures, and pronouns in profiles. Musk aims to transform X into an \"everything app\", akin to WeChat.\\nHowever, X has faced significant controversy post-rebranding. Issues such as the release of the Twitter Files, suspension of journalists\\' accounts, and temporary measures like labeling media outlets as \"state-affiliated\" and restricting their visibility have sparked criticism. Despite Musk stepping down as CEO, X continues to grapple with challenges such as viral misinformation, hate speech, and antisemitism controversies. In response to allegations, X Corp. has pursued legal action against nonprofit organizations Media Matters and the Center for Countering Digital Hate.\\n\\n\\n== History ==\\n\\n\\n=== Acquisition of Twitter ===\\n\\nElon Musk initiated the acquisition of Twitter, Inc. on April 14, 2022, and completed it on October 28, 2022. His goal was to transform Twitter into X, an all-encompassing app inspired by WeChat. By April, Musk had become Twitter\\'s largest shareholder with a 9.2 percent stake and made an unsolicited $44 billion offer on April 14, which Twitter\\'s board initially resisted before accepting on April 25. In July, Musk attempted to terminate the deal, citing Twitter\\'s failure to address spam bot accounts. Twitter sued him, with a trial set for mid-October. Musk then reversed his decision and completed the acquisition on October 28. He became the new owner and CEO, took Twitter private, merged it into X Corp., and fired several top executives, including CEO Parag Agrawal. Following Twitter\\'s change in ownership, Musk renamed several features to remove references to bird-oriented terminology, including Birdwatch to Community Notes.\\n\\n\\n=== Post-acquisition ===\\nOn July 23, 2023, Musk announced X\\'s launch, which would replace Twitter, which started when the X.com domain (formerly associated with PayPal) began redirecting to Twitter; the logo was changed from the bird to the X the next day, and the platform\\'s official main and associated accounts also began using the letter X within their handles. The @x handle was originally owned by photographer Gene X Hwang, who registered it in 2007. Hwang had expressed willingness to sell the handle, but received an email on July 25, 2023, stating that the company was taking it. He was offered some X merchandise and a meeting with the company\\'s leaders, but no financial benefits. The Android app\\'s name and icon were changed to X on Google Play by July 27; the same change went live on the App Store on July 31 after Apple granted an exception to its minimum character length of 2. Around that time, some more elements of the Twitter branding were removed from the web version, including tweets being renamed to \"posts\".\\nThe rebrand was described as unusual, given that Twitter\\'s brand was already strong internationally, with words like \"tweet\" having entered common language. The rebranding ha', metadata={'title': 'Twitter under Elon Musk', 'summary': 'Elon Musk completed his acquisition of Twitter in October 2022; Musk acted as CEO of Twitter until June 2023 when he was succeeded by Linda Yaccarino. Under Musk, Twitter was rebranded to X. It is one of the top social media platforms and the seventh-most visited website in the world. Users can share posts containing text messages, images, and videos and interact with other users\\' content through likes and reposts. X offers additional features such as direct messaging, video and audio calling, bookmarks, lists, communities, a chatbot, and the social audio feature Spaces.\\nFounded in March 2006 by Jack Dorsey, Noah Glass, Biz Stone, and Evan Williams as Twitter, it underwent a rebranding in July 2023 after being acquired by Elon Musk in 2022. \\nNow operating as X, the platform closely resembles its predecessor but includes additional features such as long-form texts, account monetization options, audio-video calls, integration with xAI\\'s Grok chatbot, job search, and a verification process accessible to premium users. Several Twitter features have been removed from the site, including Circles, NFT profile pictures, and pronouns in profiles. Musk aims to transform X into an \"everything app\", akin to WeChat.\\nHowever, X has faced significant controversy post-rebranding. Issues such as the release of the Twitter Files, suspension of journalists\\' accounts, and temporary measures like labeling media outlets as \"state-affiliated\" and restricting their visibility have sparked criticism. Despite Musk stepping down as CEO, X continues to grapple with challenges such as viral misinformation, hate speech, and antisemitism controversies. In response to allegations, X Corp. has pursued legal action against nonprofit organizations Media Matters and the Center for Countering Digital Hate.', 'source': 'https://en.wikipedia.org/wiki/Twitter_under_Elon_Musk'}), Document(page_content='Business magnate Elon Musk initiated an acquisition of American social media company Twitter, Inc. on April 14, 2022, and concluded it on October 28, 2022. Musk stated he intended to buy Twitter to build X, an \"everything app\" he had been developing since 2018 to mimic the Chinese app WeChat. Musk had begun buying shares of the company in January 2022, becoming its largest shareholder by April with a 9.1 percent ownership stake. Twitter invited Musk to join its board of directors, an offer he initially accepted before declining. On April 14, Musk made an unsolicited offer to purchase the company, to which Twitter\\'s board responded with a \"poison pill\" strategy to resist a hostile takeover before unanimously accepting Musk\\'s buyout offer of $44 billion on April 25. Musk stated that he planned to introduce new features to the platform, make its algorithms open-source, combat spambot accounts, and promote free speech.\\nIn July, Musk announced his intention to terminate the agreement, asserting that Twitter had breached their agreement by refusing to crack down on spambot accounts. The company filed a lawsuit against Musk in the Delaware Court of Chancery shortly thereafter, with a trial scheduled for the week of October 17. Weeks before the trial was set to begin, Musk reversed course, announcing that he would move forward with the acquisition. The deal was closed on October 28, with Musk immediately becoming Twitter\\'s new owner and CEO. Twitter was taken private and merged into a new parent company named X Corp. \\nMusk promptly fired several top executives, including previous CEO Parag Agrawal. Musk has since proposed several reforms to Twitter and laid off half of the company\\'s workforce. Hundreds of employees then resigned from the company after Musk issued an ultimatum demanding they commit to \"extremely hardcore\" work. Linda Yaccarino was appointed CEO of X Corp. In July 2023, the Twitter service was rebranded as X.\\nReactions to the buyout were mixed, with praise for Musk\\'s planned reforms and vision for the company, particularly his calls for greater free speech, but criticism over fears of a potential rise in misinformation and disinformation, harassment, and hate speech on the platform. Within the United States, conservatives have largely supported the acquisition, while many liberals and former Twitter employees have voiced concerns about Musk\\'s intentions. Since becoming owner, Musk has faced backlash for his handling of the company and account suspensions, including the December 2022 suspensions of ten journalists.\\n\\n\\n== Prelude ==\\n\\n\\n=== Background ===\\n\\nBusiness magnate Elon Musk published his first tweet on his personal Twitter account in June 2010, and had more than 80 million followers by April 2022. In 2017, in response to a tweet suggesting that he buy Twitter, Inc., Musk replied, \"How much is it?\" On March 24, 2022, Musk began tweeting criticisms of Twitter, polling his followers on whether the company adhered to the principle that \"free speech is essential to a functioning democracy\". Days later, he discussed the future of social media with Twitter co-founder and former CEO Jack Dorsey and explored the possibility of joining Twitter\\'s board of directors with private equity firm Silver Lake co-CEO Egon Durban. He relayed this idea to Twitter board chair Bret Taylor and CEO Parag Agrawal, proposing to either take the company private or start a rival social media platform. Dorsey responded to Musk with a text message, saying he hoped Twitter could become open-sourced and that he had unsuccessfully pushed for Musk\\'s induction into Twitter\\'s board a year earlier, a move that had prompted his departure from his role as CEO.\\n\\n\\n=== Early developments ===\\nMusk began purchasing Twitter stock on January 31, 2022. On April 4, he announced that he had acquired 9.2 percent of the company\\'s shares totaling $2.64 billion, making him the company\\'s largest shareholder. Following the announcement, Twitter\\'s stock experienced its larg', metadata={'title': 'Acquisition of Twitter by Elon Musk', 'summary': 'Business magnate Elon Musk initiated an acquisition of American social media company Twitter, Inc. on April 14, 2022, and concluded it on October 28, 2022. Musk stated he intended to buy Twitter to build X, an \"everything app\" he had been developing since 2018 to mimic the Chinese app WeChat. Musk had begun buying shares of the company in January 2022, becoming its largest shareholder by April with a 9.1 percent ownership stake. Twitter invited Musk to join its board of directors, an offer he initially accepted before declining. On April 14, Musk made an unsolicited offer to purchase the company, to which Twitter\\'s board responded with a \"poison pill\" strategy to resist a hostile takeover before unanimously accepting Musk\\'s buyout offer of $44 billion on April 25. Musk stated that he planned to introduce new features to the platform, make its algorithms open-source, combat spambot accounts, and promote free speech.\\nIn July, Musk announced his intention to terminate the agreement, asserting that Twitter had breached their agreement by refusing to crack down on spambot accounts. The company filed a lawsuit against Musk in the Delaware Court of Chancery shortly thereafter, with a trial scheduled for the week of October 17. Weeks before the trial was set to begin, Musk reversed course, announcing that he would move forward with the acquisition. The deal was closed on October 28, with Musk immediately becoming Twitter\\'s new owner and CEO. Twitter was taken private and merged into a new parent company named X Corp. \\nMusk promptly fired several top executives, including previous CEO Parag Agrawal. Musk has since proposed several reforms to Twitter and laid off half of the company\\'s workforce. Hundreds of employees then resigned from the company after Musk issued an ultimatum demanding they commit to \"extremely hardcore\" work. Linda Yaccarino was appointed CEO of X Corp. In July 2023, the Twitter service was rebranded as X.\\nReactions to the buyout were mixed, with praise for Musk\\'s planned reforms and vision for the company, particularly his calls for greater free speech, but criticism over fears of a potential rise in misinformation and disinformation, harassment, and hate speech on the platform. Within the United States, conservatives have largely supported the acquisition, while many liberals and former Twitter employees have voiced concerns about Musk\\'s intentions. Since becoming owner, Musk has faced backlash for his handling of the company and account suspensions, including the December 2022 suspensions of ten journalists.\\n\\n', 'source': 'https://en.wikipedia.org/wiki/Acquisition_of_Twitter_by_Elon_Musk'}), Document(page_content='Maye Musk (née Haldeman; born April 19, 1948) is a model and dietitian. She has been a model for 50 years, appearing on the covers of magazines, including a Time magazine health edition, Women\\'s Day, international editions of Vogue, and Sports Illustrated Swimsuit Issue. She is the mother of Elon Musk, Kimbal Musk and Tosca Musk. She holds Canadian, South African, and American citizenship. She is a registered dietitian.\\n\\n\\n== Early life and career ==\\nMaye Haldeman was born on April 19, 1948, in Regina, Saskatchewan, Canada, a twin and one of five children. Her family moved to Pretoria, South Africa, in 1950. Her parents, Winnifred Josephine \"Wyn\" (Fletcher) and Dr. Joshua Norman Haldeman, a former director of Technocracy Incorporated, a former Regina chiropractor and amateur archaeologist, were adventurous and flew the family around the world in a prop plane in 1952. For over ten years, the family spent time roaming the Kalahari desert in search of its fabled Lost City of the Kalahari. Their parents gave slide shows and talks about their journeys. \"My parents were very famous, but they were never snobs,\" she said. Joshua Haldeman was a political activist who ran for the Canadian Parliament on the Social Credit Party ticket, and headed the Canadian branch of the Technocracy movement. In 1956 Dr. Haldeman participated on the 3rd edition of the trans-Africa Algiers-Cape Town Rally with a Ford Ranch-Wagon 5.4L and finished tied for 1st place.\\nAs her parents were entrepreneurs, Musk started working at about 8 years of age, where she would \"prepare her parents monthly bulletins and photocopy newsletters, and then put the stamps on the envelopes.” By the age of 12, before and then after school, Musk worked as a receptionist alongside her twin sister for their father. \\nAs a young woman, Haldeman was a finalist in the 1969 Miss South Africa beauty competition. In 1970, she married Errol Musk, a South African engineer she met in high school. They had three children: Elon Musk, Kimbal Musk, and Tosca Musk. She named Elon after her American grandfather, John Elon Haldeman (born in Illinois). \\nIn 1979, she divorced Errol Musk. Two years later, Elon, who was about 10 at the time, decided to live with his father, as he had the Encyclopaedia Britannica, and a computer, things which Maye could not afford to give the children, as a single parent. Kimbal joined Elon four years later. After graduating from high school, Elon decided to move to Canada; in 1989, six months later, Maye moved to Canada with her daughter Tosca.\\nMaye earned a master\\'s degree in dietetics from the University of the Orange Free State in South Africa. Her major was taught in Afrikaans – one of the four languages Musk now speaks. She later earned another master\\'s degree in nutritional science from the University of Toronto.\\n\\n\\n== Later life ==\\n\\nHer modelling career continued in Canada and the United States. She has appeared on boxes of Special K cereal, in Revlon ads, and in a Beyoncé video (\"Haunted\"). She appeared nude on the cover of Time magazine for a health issue and also nude on the cover of New York magazine in 2011 with a fake pregnant belly. She was on the cover of Elle Canada in 2012, and starred in advertisement campaigns for Target and Virgin America. In September 2017, she became CoverGirl\\'s oldest spokesmodel at age 69, which one news story reported as \"making history\". In 2022, at age 74, she was the oldest Sports Illustrated swimsuit model to date, appearing on the cover of the annual issue.\\nIn addition to modelling, she has a business as a dietitian and gives presentations worldwide.\\nShe wrote a memoir titled A Woman Makes a Plan: Advice for a Lifetime of Adventure, Beauty, and Success (2019).\\nIn an interview with Forbes magazine, Musk said her greatest achievement was \"having three great kids and surviving\".\\nIn 2021, she was one of the guests at Lady Kitty Spencer\\'s wedding.\\nMaye Musk appeared alongside her son Elon on Saturday Night Live on May 8, 2021, ', metadata={'title': 'Maye Musk', 'summary': \"Maye Musk (née Haldeman; born April 19, 1948) is a model and dietitian. She has been a model for 50 years, appearing on the covers of magazines, including a Time magazine health edition, Women's Day, international editions of Vogue, and Sports Illustrated Swimsuit Issue. She is the mother of Elon Musk, Kimbal Musk and Tosca Musk. She holds Canadian, South African, and American citizenship. She is a registered dietitian.\\n\\n\", 'source': 'https://en.wikipedia.org/wiki/Maye_Musk'}), Document(page_content='Elon Musk\\'s Tesla Roadster is an electric sports car that served as the dummy payload for the February 2018 Falcon Heavy test flight and became an artificial satellite of the Sun. A mannequin in a spacesuit, dubbed \"Starman\", occupies the driver\\'s seat. The car and rocket are products of Tesla and SpaceX, respectively, both companies headed by Elon Musk. The 2010 Roadster is personally owned by and previously used by Musk for commuting to work. It is the first production car launched into space.\\nThe car, mounted on the rocket\\'s second stage, was launched on an escape trajectory and entered an elliptical heliocentric orbit crossing the orbit of Mars. The orbit reaches a maximum distance from the Sun at aphelion of 1.66 astronomical units (au). Video of the Roadster during the launch was transmitted back to the mission control center and live-streamed.\\nAdvertising analysts noted Musk\\'s sense of brand management and use of new media for his decision to launch a Tesla into space. Musk explained he wanted to inspire the public about the \"possibility of something new happening in space\" as part of his larger vision for spreading humanity to other planets.\\n\\n\\n== Background ==\\n\\nIn March 2017, SpaceX\\'s founder, Elon Musk, said that because the launch of the new Falcon Heavy vehicle was risky, it would carry the \"silliest thing we can imagine\".\\nIn June 2017, one of his Twitter followers suggested that the silly thing be a Tesla Model S, to which Musk replied: \"Suggestions welcome!\"\\nIn December 2017, Musk announced that the payload would be his personal \"midnight cherry Tesla Roadster\".\\nOne of the test flight objectives was to demonstrate that the new rocket could carry a payload as far as the orbit of Mars. NASA deputy administrator Lori Garver stated that SpaceX had \"offered free launches to NASA, Air Force etc. but got no takers\", and that \"the Tesla gimmick was the backup\".\\nThe Roadster is the first standard roadworthy vehicle sent into space, following several special-purpose lunar and Mars rovers.\\n\\n\\n=== Roadster as payload ===\\n\\nThe car was permanently mounted on the rocket in an inclined position above the payload adapter. Tubular structures were added to mount front and side cameras. Photos of the car prior to payload encapsulation were released.\\nPositioned in the driver\\'s seat is \"Starman\", a full-scale human mannequin clad in a SpaceX pressure spacesuit. It was placed with the right hand on the steering wheel and the left elbow resting on the open window sill. The mannequin was named after the David Bowie song \"Starman\", and the car\\'s sound system was set before launch to continuously loop the Bowie song \"Space Oddity\".\\nA copy of Douglas Adams\\' novel The Hitchhiker\\'s Guide to the Galaxy is in the glove box, along with references to the book in the form of a towel and a sign on the dashboard that reads \"DON\\'T PANIC!\". A Hot Wheels miniature Roadster with a miniature Starman is mounted on the dashboard. A plaque bearing the names of the employees who worked on the project is placed underneath the car, and a message on the vehicle\\'s circuit board reads \"Made on Earth by humans\". The car also carries a copy of Isaac Asimov\\'s Foundation trilogy on a 5D optical disc, a proof of concept for high-density long-lasting data storage, donated to Musk by the Arch Mission Foundation.\\n\\n\\n== Trajectory ==\\n\\nThe US Office of Commercial Space Transportation issued the test flight\\'s launch license on February 2, 2018. The rocket lifted off from Launch Complex 39A at Kennedy Space Center at 15:45 EST (20:45 UTC) on February 6. The upper stage supporting the car was initially placed in an Earth parking orbit. It spent six hours coasting through the Van Allen radiation belts, thereby demonstrating a new capability requested by the U.S. Air Force for direct insertion of heavy intelligence satellites into geostationary orbit. Then, the upper stage performed a second boost to reach the desired escape trajectory.\\nThe launch was live streamed, and video fee', metadata={'title': \"Elon Musk's Tesla Roadster\", 'summary': 'Elon Musk\\'s Tesla Roadster is an electric sports car that served as the dummy payload for the February 2018 Falcon Heavy test flight and became an artificial satellite of the Sun. A mannequin in a spacesuit, dubbed \"Starman\", occupies the driver\\'s seat. The car and rocket are products of Tesla and SpaceX, respectively, both companies headed by Elon Musk. The 2010 Roadster is personally owned by and previously used by Musk for commuting to work. It is the first production car launched into space.\\nThe car, mounted on the rocket\\'s second stage, was launched on an escape trajectory and entered an elliptical heliocentric orbit crossing the orbit of Mars. The orbit reaches a maximum distance from the Sun at aphelion of 1.66 astronomical units (au). Video of the Roadster during the launch was transmitted back to the mission control center and live-streamed.\\nAdvertising analysts noted Musk\\'s sense of brand management and use of new media for his decision to launch a Tesla into space. Musk explained he wanted to inspire the public about the \"possibility of something new happening in space\" as part of his larger vision for spreading humanity to other planets.\\n\\n', 'source': 'https://en.wikipedia.org/wiki/Elon_Musk%27s_Tesla_Roadster'}), Document(page_content='Elon Musk is an authorized biography of American business magnate and SpaceX/Tesla CEO Elon Musk. The book was written by Walter Isaacson, a former executive at CNN, TIME and the Aspen Institute who had previously written best-selling biographies of Benjamin Franklin, Albert Einstein, Steve Jobs and Leonardo da Vinci. The book was published on September 12, 2023, by Simon & Schuster.\\n\\n\\n== Background ==\\nElon Musk first announced that Isaacson was in the process of writing his biography in August 2021. He revealed that Isaacson had shadowed him \"for several days so far\".\\nIsaacson followed Musk for the next two years, visiting his SpaceX and Tesla factories and attending board meetings. The book is the result of hours of interviews with Musk and his family, friends, colleagues and adversaries. Isaacson was present when Musk decided to buy Twitter and to run his new AI company; Musk also shared messages from the Ukrainian minister Mykhailo Fedorov, and some were included in the book. Isaacson later said in an interview that \"Elon is very mercurial, but he never told me not to put anything in the book.\"\\n\\n\\n== Contents ==\\nIsaacson writes that Musk is \"addicted to drama\".\\n\\n\\n=== Crimean Starlink coverage deactivation claim ===\\n\\nAmong the book\\'s revelations was an account that Musk ordered Starlink to disable access to Ukrainian drones in 2022, during the Russian invasion of Ukraine, thwarting an attack on Russian warships in Crimea. Musk denied the allegation, saying satellites in the region were not turned on, and that he chose not to activate them. The biography claim prompted several allegations against Musk for deliberately disrupting the operation. Isaacson later retracted his claim as a mistake, as Crimea had no Starlink coverage prior to the attack similarly to other Russian-occupied territories of Ukraine. \\nThe Washington Post, which had published Isaacson\\'s opinion piece, corrected that \"after the publication of this adaptation, the author learned that his book mischaracterized the attempted attack by Ukrainian drones on the Russian fleet in Crimea. Musk had already disabled (\"geofenced\") coverage within 100 km of the Crimean coast before the attack began, and when the Ukrainians discovered this, they asked him to activate the coverage, and he refused.\" The Guardian and CNN also added a footnote to correct the claim.\\nIsaacson corrected his claim and clarified that Elon Musk said that the policy to not allow Starlink to be used for an attack on Crimea had been implemented earlier than the night of the Ukrainian attack, while Ukrainians did not know about it. Ukrainian general Kyrylo Budanov declared being \"not sure that Elon Musk operated some mythical buttons and stopped the movement of some devices. This is my personal opinion. The fact that the Starlink systems did not work for a certain time near the Crimea, I can absolutely confirm, because we also used a certain technique. We immediately realized that there is simply no coverage there\".\\n\\n\\n== Reception ==\\nAhead of its publication, the book topped Amazon\\'s bestseller list. It debuted at number one on The New York Times nonfiction best-seller list for the week ending September 16, 2023.\\nAt the review aggregator website Book Marks, the book had an overall rating of \"mixed\", based on 15 book reviews from mainstream literary critics. \\nThe New York Times critic Jennifer Szalai wrote, \"Isaacson [...] is a patient chronicler of obsession; in the case of Musk, he can occasionally seem too patient.\"\\nBrian Merchant of the Los Angeles Times criticized Isaacson\\'s \"great man\" biography format as extremely dated and took issue with his persistent framing of Musk as a \"moody but brilliant world-mover\", writing, \"The author will unearth unflattering personal anecdotes and share stories about the subject\\'s capacity to be cruel. In exchange, the subject\\'s greatness will be treated as an assumption.\"\\nIn The Guardian, Gary Shteyngart called the book a \"dull, insight-free doorstop\", and critici', metadata={'title': 'Elon Musk (Isaacson book)', 'summary': 'Elon Musk is an authorized biography of American business magnate and SpaceX/Tesla CEO Elon Musk. The book was written by Walter Isaacson, a former executive at CNN, TIME and the Aspen Institute who had previously written best-selling biographies of Benjamin Franklin, Albert Einstein, Steve Jobs and Leonardo da Vinci. The book was published on September 12, 2023, by Simon & Schuster.\\n\\n', 'source': 'https://en.wikipedia.org/wiki/Elon_Musk_(Isaacson_book)'}), Document(page_content=\"Kimbal James Musk (born 20 September 1972) is a South African restaurateur, chef, and entrepreneur. He owns The Kitchen Restaurant Group, a collection of restaurants located in Colorado and Chicago. He is the co-founder and chairman of Big Green, a 501(c)(3) nonprofit that has built hundreds of outdoor classrooms called Learning Gardens in schoolyards across America. Musk is also the co-founder and chairman of Square Roots, an urban farming company growing food in hydroponic, indoor, climate controlled shipping containers. Musk currently sits on the boards of Tesla Inc. and SpaceX, both of which his brother Elon is the current CEO. He was on the board of Chipotle Mexican Grill from 2013 to 2019. He is the brother of Elon Musk and Tosca Musk, son of Errol and Maye Musk, and a major shareholder in Tesla.\\nIn 1995 he co-founded, with his brother, Elon Musk, the software company Zip2, which was acquired by Compaq for $307 million in 1999.\\n\\n\\n== Early life ==\\nMusk grew up with his brother Elon, sister Tosca, and many cousins. His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa. His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve. After finishing high school in Pretoria, South Africa, Musk left to meet his brother in Kingston, Ontario, Canada, and enrolled at Queen's University to pursue a degree in business. While in school, Musk first worked at Scotiabank. He graduated with his degree from Queen's University in 1995.\\n\\n\\n== Business career ==\\nMusk's first venture was a residential painting business with College Pro Painters in 1994, the same year he and his elder brother, Elon, started their second company, Zip2. Zip2 was an online city guide that provided content for the new online versions of The New York Times and the Chicago Tribune newspapers. The company was sold in 1999 to Compaq for $307 million.\\nAfter selling Zip2, Musk invested in several young software and technology companies. Musk was an early investor in his brother's venture X.com, an online financial services and email payments company. X.com merged with PayPal, which in October 2002 was acquired by eBay for $1.5 billion in stock.\\nWhile Elon stayed in California, Kimbal moved to New York and enrolled into the French Culinary Institute in New York City. In April 2004, Musk opened The Kitchen, a community bistro in Boulder, Colorado with Jen Lewin and Hugo Matheson. In addition to its flagship restaurant in Boulder, The Kitchen has locations in downtown Denver and Chicago.\\nFrom 2006 to 2011, Musk served as the CEO of OneRiot, an advertising network. In September 2011, Walmart-Labs acquired OneRiot for an undisclosed purchase price.\\nIn 2011, Next Door American Eatery opened in downtown Boulder as a fast casual American eatery. Next Door American Eatery is a growing restaurant concept with ten locations as of 2019.\\nAfter seven years of supporting the Growe Foundation to plant school gardens in the Boulder community, in 2011 Musk and Matheson established Big Green (originally named The Kitchen Community), a 501c3 nonprofit to help connect kids to real food by creating dynamic Learning Garden classrooms in schools across America. Learning Gardens teach children an understanding of food, healthy eating, lifestyle choices and environment through lesson plans and activities that tie into existing school curriculum, such as math, science, and literacy.\\nEach of The Kitchen restaurants donates a percentage of sales to help plant Learning Gardens in its local community. In 2012, Big Green built 26 gardens in Colorado, 16 in Chicago, and 12 more around the USA.\\nIn December 2012, Chicago Mayor Rahm Emanuel handed Musk's nonprofit $1 million to install 80 Learning Gardens in Chicago city schools. On 2 February 2015, The Kitchen Community celebrated its 200th L\", metadata={'title': 'Kimbal Musk', 'summary': 'Kimbal James Musk (born 20 September 1972) is a South African restaurateur, chef, and entrepreneur. He owns The Kitchen Restaurant Group, a collection of restaurants located in Colorado and Chicago. He is the co-founder and chairman of Big Green, a 501(c)(3) nonprofit that has built hundreds of outdoor classrooms called Learning Gardens in schoolyards across America. Musk is also the co-founder and chairman of Square Roots, an urban farming company growing food in hydroponic, indoor, climate controlled shipping containers. Musk currently sits on the boards of Tesla Inc. and SpaceX, both of which his brother Elon is the current CEO. He was on the board of Chipotle Mexican Grill from 2013 to 2019. He is the brother of Elon Musk and Tosca Musk, son of Errol and Maye Musk, and a major shareholder in Tesla.\\nIn 1995 he co-founded, with his brother, Elon Musk, the software company Zip2, which was acquired by Compaq for $307 million in 1999.\\n\\n', 'source': 'https://en.wikipedia.org/wiki/Kimbal_Musk'}), Document(page_content='Tosca Musk (born 20 July 1974) is a South African filmmaker. She is an executive producer and director of feature films, television programs, and web content. Her work includes K. Bromberg\\'s Driven, Rachel van Dyken\\'s Matchmaker\\'s Playbook, and her web series, Tiki Bar TV. Tosca is the younger sister of Elon Musk and Kimbal Musk, and daughter of Errol Musk and Maye Musk. She co-founded the streaming service Passionflix.\\n\\n\\n== Early life and education ==\\nMusk was born in South Africa and grew up in Johannesburg with her two older brothers: Kimbal and Elon. In 1979, her parents, Errol and Maye Musk, divorced. In 1981, Elon moved to live with his father; four years later, Kimbal did so as well. After graduating from high school, Elon moved to Canada; six months later, in 1989, Maye also moved to Canada with Tosca.\\nTosca Musk graduated from the University of British Columbia with a BFA degree in film studies in 1997.\\n\\n\\n== Career ==\\nMusk produced and directed her first feature film, Puzzled, in 2001 with Musk Entertainment. Elon Musk was the film\\'s executive producer. Soon thereafter, Musk produced the feature film, The Truth About Miranda, since followed by over a dozen features, television movies and series, including the teen horror film, Cruel World, the UK feature, The Heavy and the television drama, We Have Your Husband. In 2011, Musk produced three more television movies which aired on Lifetime and Hallmark in early 2012.\\nIn 2005, Tosca Musk partnered with Jeff Macpherson to produce the web series, Tiki Bar TV. That same year, during the Macworld 2005 Keynote presentation (which introduced the iPod with Video) Steve Jobs showcased Tiki Bar TV to the audience as an example of a video podcast (a relatively new media format at the time) which could be loaded to the new video iPod using Apple\\'s iTunes software.\\nTiki Bar TV has been featured in Wired magazine, as well as in other media outlets. In July 2006, the show was featured in a profile on Jeff Macpherson in Forbes magazine\\'s Celebrity 100 Issue as \"one of the first breakout stars in the world of Internet television\".\\nMusk is the CEO and co-founder of the OTT streaming platform Passionflix, which The New York Times describes as \"sexy Hallmark Channel.\" Developed in 2017 with writer Joany Kane and producer Jina Panebianco, Passionflix makes movies out of romance novels. As of 2022, it charges customers $6 per month for its service and it had raised $22 million in funding. Tosca has directed several feature films for the platform including Alessandra Torre\\'s Hollywood Dirt, Sylvia Day\\'s Afterburn/Aftershock, Rachel van Dyken\\'s The Matchmaker\\'s Playbook, K. Bromberg\\'s Driven, Jodi Ellen Malpas\\' The Protector, and Sylvain Reynard\\'s Gabriel\\'s Inferno series.\\n\\n\\n== Awards and recognition ==\\n\\n\\n== References ==\\n\\n\\n== External links ==\\nTosca Musk at IMDb', metadata={'title': 'Tosca Musk', 'summary': \"Tosca Musk (born 20 July 1974) is a South African filmmaker. She is an executive producer and director of feature films, television programs, and web content. Her work includes K. Bromberg's Driven, Rachel van Dyken's Matchmaker's Playbook, and her web series, Tiki Bar TV. Tosca is the younger sister of Elon Musk and Kimbal Musk, and daughter of Errol Musk and Maye Musk. She co-founded the streaming service Passionflix.\", 'source': 'https://en.wikipedia.org/wiki/Tosca_Musk'}), Document(page_content='Elon Musk is an American businessman and investor who has made numerous cameo appearances in films and television shows as himself. These appearances include Iron Man 2, The Simpsons, South Park, The Big Bang Theory, and Rick and Morty. He has also made appearances in many documentary films.\\n\\n\\n== Films ==\\n\\n\\n== Television ==\\n\\n\\n== Documentaries ==\\n\\n\\n== References ==', metadata={'title': 'Elon Musk filmography', 'summary': 'Elon Musk is an American businessman and investor who has made numerous cameo appearances in films and television shows as himself. These appearances include Iron Man 2, The Simpsons, South Park, The Big Bang Theory, and Rick and Morty. He has also made appearances in many documentary films.\\n\\n', 'source': 'https://en.wikipedia.org/wiki/Elon_Musk_filmography'}), Document(page_content='The Boring Company (TBC) is an American infrastructure, tunnel construction services, and equipment company founded by Elon Musk. TBC was founded as a subsidiary of SpaceX in 2017, and was spun off as a separate corporation in 2018. TBC has completed one tunneling project that is open to the public, as well as multiple test tunnels.\\nIn 2018, TBC completed one tunnel for testing in Los Angeles County, California. In 2021, TBC completed the Las Vegas Convention Center (LVCC) Loop, which is a three-station transportation system consisting of 1.7 miles (2.7 km) of tunnels. As of April 2024, a segment to Resorts World is also open, and tunnels to Encore and Westgate resorts are being finalized. The system is planned to expand to a total of 68 miles (109 km) of tunnels in Las Vegas. \\nMany other TBC projects in cities across the United States have been announced, but subsequently were canceled or became inactive due to a lack of activity from the company.\\n\\n\\n== History ==\\n\\nMusk announced the idea of the Boring Company in December 2016, and it was officially registered as \"TBC – The Boring Company\" on January 11, 2017. Musk cited difficulty with Los Angeles traffic, and what he sees as limitations of its two-dimensional transportation network, as his early inspiration for the project. The Boring Company was formed as a SpaceX subsidiary. According to Musk, the company\\'s goal is to enhance tunneling speed enough such that establishing a tunnel network is financially feasible. \\nIn early 2018, the Boring Company was spun out from SpaceX and into a separate corporate entity. Somewhat less than 10% of equity was given to early employees, and over 90% to Elon Musk. Early employees came from a variety of different backgrounds, including those from SpaceX.\\nThe company began designing its own tunnel boring machines, and completed several tests in Hawthorne, California. The Hawthorne test tunnel opened to the public on December 18, 2018.\\nAfter raising US$113 million in non-outside capital during 2018, the Boring Company sold $120 million in stock to venture capital firms in July 2019. By November 2019, Steve Davis had become company president after leading efforts for Musk since 2016. Davis was one of the earliest hires at SpaceX (in 2003) and has twin master\\'s degrees in particle physics and aerospace engineering, as well as degrees in finance and mechanical engineering.\\nIn November 2020, TBC announced hiring for positions in Austin, Texas, and by December 2020 had leased two buildings in a 14-acre (5.7 ha) industrial complex northeast of Austin, approximately 16 miles (26 km) north of Texas Gigafactory.\\nOn April 20, 2022, the company announced an additional $675 million Series C funding round, valuing the company at approximately $5.675 billion. The round was led by Vy Capital and Sequoia Capital, with participation from Valor Equity Partners, Founders Fund, 8VC, Craft Ventures, and DFJ Growth.\\nIn 2022, the company was cited by the Texas Commission on Environmental Quality for five violations of Texas environmental regulations.\\nSometime before April 2023, the company moved their headquarters and engineering facilities to Bastrop, Texas, approximately 25 miles (40 km) east of Texas Gigafactory. \\nCurrently, tunnels connecting different parts of the LVCC are open, and a tunnel to Resorts World started operating in July 2023.\\n\\n\\n== Machines ==\\n\\nThe first boring machine utilized by TBC was Godot, a conventional tunnel boring machine (TBM) made by Lovat. TBC then designed their own line of machines called Prufrock. Prufrock 1 was unveiled in 2020, and was used mostly for testing. Engadget reported that the Prufrock 2, which was unveiled in August 2022, could dig up to a mile per week. Prufrock 3 was planned to dig up to seven miles per day, although this was not achieved. In May 2024, Prufrock 4 was nearly complete, while Prufrock 5 was in the design stage.\\n\\n\\n== Process ==\\nTBC redesigning the entire tunnel boring process to reduce cost, accelerate tu', metadata={'title': 'The Boring Company', 'summary': 'The Boring Company (TBC) is an American infrastructure, tunnel construction services, and equipment company founded by Elon Musk. TBC was founded as a subsidiary of SpaceX in 2017, and was spun off as a separate corporation in 2018. TBC has completed one tunneling project that is open to the public, as well as multiple test tunnels.\\nIn 2018, TBC completed one tunnel for testing in Los Angeles County, California. In 2021, TBC completed the Las Vegas Convention Center (LVCC) Loop, which is a three-station transportation system consisting of 1.7 miles (2.7 km) of tunnels. As of April 2024, a segment to Resorts World is also open, and tunnels to Encore and Westgate resorts are being finalized. The system is planned to expand to a total of 68 miles (109 km) of tunnels in Las Vegas. \\nMany other TBC projects in cities across the United States have been announced, but subsequently were canceled or became inactive due to a lack of activity from the company.', 'source': 'https://en.wikipedia.org/wiki/The_Boring_Company'}), Document(page_content='Claire Elise Boucher ( boo-SHAY; born March 17, 1988), known professionally as Grimes, is a Canadian musician, singer, songwriter, and record producer. Her early work has been described as extending from \"lo-fi R&B\" to futuristic dance-pop, and has incorporated influences from electronic music, hip hop, and rock. Her lyrics often touch on science fiction and feminist themes. The visuals in her videos are elaborate and sometimes have fantasy themes. She has released five studio albums.\\nBorn and raised in Vancouver, Grimes began releasing music independently after moving to Montreal in 2006. She released two albums, Geidi Primes and Halfaxa, in 2010 on Arbutus Records, before signing with 4AD and rising to prominence with the release of her 2012 album, Visions. The album received the Canadian music industry Juno Award for Electronic Album of the Year, and yielded two singles: \"Genesis\" and \"Oblivion\". Following this, her fourth studio album, Art Angels, was released in 2015, and several publications named it the best album of the year. Her fifth studio album, Miss Anthropocene, was released in 2020.\\nOutside of music, Grimes had a voice role in the 2020 action role-playing video game Cyberpunk 2077 and is a judge on the music competition game show Alter Ego. She has three children with the South African-American businessman Elon Musk.\\n\\n\\n== Early life ==\\nGrimes was born Claire Elise Boucher in Vancouver, British Columbia on March 17, 1988, the eldest child of Sandy Garossino, a former Crown prosecutor and arts advocate, and Maurice Boucher, a former banker who works \"in the business side of biotech\". She is of French Canadian (including Québécois), and Italian descent. \\nGrimes and her younger brother, Mac, were raised Roman Catholic, and attended Catholic school in Vancouver. She later commented that her religious upbringing had a significant impact on her: \"It totally influences everything I do. I think I have serious latent Catholic guilt issues.\" Her parents divorced when she was 11 years old, after which her mother remarried. Through her mother\\'s remarriage, she has two stepbrothers, one of whom is a member of the hip hop duo LNDN DRGS and performs under the name Jay Worthy.\\nIn 2006, Grimes graduated from Lord Byng Secondary School and relocated from Vancouver to Montreal to attend McGill University\\'s joint Bachelor of Arts and Science program. \"I was studying general Arts and Science degree, but I was in the electro-acoustics program\" she said in early interviews. However, she later claimed to have studied neuroscience. She was expelled in December 2010 for skipping classes.\\n\\n\\n== Career ==\\n\\n\\n=== 2009–2011: Career beginnings, Geidi Primes, and Halfaxa ===\\n\\nAccording to the timestamps on her original Myspace page, she began writing music under the name Grimes in 2007. Her performer name was chosen because at the time, MySpace allowed artists to list three musical genres. She listed \"grime\" for all three, without knowing what the grime music genre was. Grimes was self-taught in music and visual art.\\n\\nIn January 2010, Grimes released her debut album, Geidi Primes, a concept album inspired by the Dune series, followed by her second album, Halfaxa, in October of the same year. After the release of Halfaxa, she began to publicly promote her music and tour beyond Montreal. In 2011 Grimes released five songs on her side of the split 12\" with d\\'Eon, Darkbloom (through both Arbutus and Hippos in Tanks). Beginning in May 2011, Grimes opened for Lykke Li on her North American Tour, and the following August her debut album was re-released through No Pain in Pop Records, in CD and vinyl format for the first time. In 2011, she collaborated with DJ/producer Blood Diamonds.\\n\\n\\n=== 2011–2014: Visions ===\\n\\nFollowing extensive touring and positive reception to her first two albums and Darkbloom contribution, Grimes signed with record label 4AD in January 2012. Her third studio album, Visions, was released on January 31, 2012, in Canada through Ar', metadata={'title': 'Grimes', 'summary': 'Claire Elise Boucher ( boo-SHAY; born March 17, 1988), known professionally as Grimes, is a Canadian musician, singer, songwriter, and record producer. Her early work has been described as extending from \"lo-fi R&B\" to futuristic dance-pop, and has incorporated influences from electronic music, hip hop, and rock. Her lyrics often touch on science fiction and feminist themes. The visuals in her videos are elaborate and sometimes have fantasy themes. She has released five studio albums.\\nBorn and raised in Vancouver, Grimes began releasing music independently after moving to Montreal in 2006. She released two albums, Geidi Primes and Halfaxa, in 2010 on Arbutus Records, before signing with 4AD and rising to prominence with the release of her 2012 album, Visions. The album received the Canadian music industry Juno Award for Electronic Album of the Year, and yielded two singles: \"Genesis\" and \"Oblivion\". Following this, her fourth studio album, Art Angels, was released in 2015, and several publications named it the best album of the year. Her fifth studio album, Miss Anthropocene, was released in 2020.\\nOutside of music, Grimes had a voice role in the 2020 action role-playing video game Cyberpunk 2077 and is a judge on the music competition game show Alter Ego. She has three children with the South African-American businessman Elon Musk.\\n\\n', 'source': 'https://en.wikipedia.org/wiki/Grimes'}), Document(page_content='Jennifer Justine Musk (née Wilson; born September 2, 1972) is a Canadian author.\\n\\n\\n== Early life ==\\nJustine Wilson was born in Peterborough, Ontario, and she spent most of her early life there. She attended Queen\\'s University in Kingston, Ontario and obtained a degree in English literature. \\n\\n\\n== Career ==\\nAfter college, Wilson moved to Japan, teaching English as a second language (ESL). She subsequently settled in California.\\nWilson is the author of the contemporary fantasy novel BloodAngel, published in 2005 by the Roc Books imprint of Penguin Books. Her second book, Uninvited, was released in 2007 and is an unrelated work intended for young-adult readers. A sequel to BloodAngel, Lord of Bones, was released in 2008. Musk was one of the first people to use a site like Pinterest to plan out a novel.\\nIn a 2007 interview, she identified Margaret Atwood, Joyce Carol Oates, Paul Theroux, George R.R. Martin, Guy Gavriel Kay, and Neil Gaiman as authors to whom she could relate her writings. She also described her books as cross-genre fiction.\\n\\n\\n== Personal life ==\\nIn January 2000, Wilson married Elon Musk. Their first child was born in 2002 and died of sudden infant death syndrome (SIDS) at the age of 10 weeks. Through in vitro fertilization, she gave birth to twins in 2004 and to triplets in 2006. On September 13, 2008, she announced that she and Musk were getting a divorce. She and Musk share custody of their children.\\nWilson later wrote an article for Marie Claire detailing ways she thought the marriage was unhealthy, such as Musk\\'s dismissal of her career ambitions, his description of himself as the \"alpha\" in the relationship, and his pressure for her to become a trophy wife. In 2010, she described herself as a \"model former wife\", and said she was on good terms with Musk\\'s then-wife, Talulah Riley. \\nShe has stated that she kept the last name Musk for the sake of their children. In 2022, one of their twins officially changed her name to reflect her gender identity, and took Wilson as her surname because she no longer wished to be associated with her father. \\n\\n\\n== Bibliography ==\\n\\n\\n== Notes ==\\n\\n\\n== References ==\\n\\n\\n== External links ==\\nOfficial website \\nJustine Musk at the Internet Speculative Fiction Database', metadata={'title': 'Justine Musk', 'summary': 'Jennifer Justine Musk (née Wilson; born September 2, 1972) is a Canadian author.\\n\\n', 'source': 'https://en.wikipedia.org/wiki/Justine_Musk'}), Document(page_content='Neuralink Corp. is an American neurotechnology company that has developed, as of 2024, implantable brain–computer interfaces (BCIs), and is based in Fremont, California. Founded by Elon Musk and a team of seven scientists and engineers, Neuralink was launched in 2016 and was first publicly reported in March 2017.\\nSince its founding, the company has hired several high-profile neuroscientists from various universities. By July 2019, it had received $158 million in funding (of which $100 million was from Musk) and was employing a staff of 90 employees. At that time, Neuralink announced that it was working on a \"sewing machine-like\" device capable of implanting very thin (4 to 6 μm in width) threads into the brain, and demonstrated a system that reads information from a lab rat via 1,500 electrodes. They had anticipated starting experiments with humans in 2020, but have since moved that projection to 2023. As of May 2023, they have been approved for human trials in the United States.\\nThe company has faced criticism for a large amount of euthanization of primates that underwent medical trials. Veterinary records of the monkeys showed a number of complications with electrodes being surgically implanted.\\nOn January 29, 2024, Musk said that Neuralink had successfully implanted a Neuralink device in a human and that the patient was recovering.\\n\\n\\n== Company ==\\n\\n\\n=== History ===\\n\\nNeuralink was founded in 2016 by Elon Musk and a founding team of seven scientists and engineers. The group of initial hires consisted of experts in areas such as neuroscience, biochemistry and robotics. The trademark \"Neuralink\" was purchased from its previous owners in January 2017.\\nIn April 2017, Neuralink announced that it was aiming to make devices to treat serious brain diseases in the short-term, with the eventual goal of human enhancement, sometimes called transhumanism. Musk had said his interest in the idea partly stemmed from the science fiction concept of \"neural lace\" in the fictional universe in The Culture, a series of 10 novels by Iain M. Banks.\\nMusk defined the neural lace as a \"digital layer above the cortex\" that would not necessarily imply extensive surgical insertion but ideally an implant through a vein or artery. He said the long-term goal is to achieve \"symbiosis with artificial intelligence\", which he perceives as an existential threat to humanity if it goes unchecked. He believes the device will be \"something analogous to a video game, like a saved game situation, where you are able to resume and upload your last state\" and \"address brain injuries or spinal injuries and make up for whatever lost capacity somebody has with a chip.\"\\nAs of 2020, Neuralink was headquartered in San Francisco\\'s Mission District, sharing the Pioneer building with OpenAI, another company co-founded by Musk.\\nAs of 2022, Neuralink\\'s headquarters were in Fremont, California. Jared Birchall, the head of Musk\\'s family office, was listed as CEO, CFO and president of Neuralink in 2018. As of September 2018, Musk was the majority owner of Neuralink but did not hold an executive position. By August 2020, only three of the eight founding scientists remained at the company, according to an article by Stat News which reported that Neuralink had seen \"years of internal conflict in which rushed timelines have clashed with the slow and incremental pace of science.\"\\nIn April 2021, Neuralink demonstrated a monkey playing the game \"Pong\" using the Neuralink implant. While similar technology has existed since 2002, when a research group first demonstrated a monkey moving a computer cursor with neural signals, scientists acknowledged the engineering progress in making the implant wireless and increasing the number of implanted electrodes. In May 2021, co-founder and president Max Hodak announced that he no longer works with the company. Only two of the eight co-founders remained at the company by January 2022.\\n\\n\\n== Technology ==\\nIn 2018, Gizmodo reported that Neuralink \"remained h', metadata={'title': 'Neuralink', 'summary': 'Neuralink Corp. is an American neurotechnology company that has developed, as of 2024, implantable brain–computer interfaces (BCIs), and is based in Fremont, California. Founded by Elon Musk and a team of seven scientists and engineers, Neuralink was launched in 2016 and was first publicly reported in March 2017.\\nSince its founding, the company has hired several high-profile neuroscientists from various universities. By July 2019, it had received $158 million in funding (of which $100 million was from Musk) and was employing a staff of 90 employees. At that time, Neuralink announced that it was working on a \"sewing machine-like\" device capable of implanting very thin (4 to 6 μm in width) threads into the brain, and demonstrated a system that reads information from a lab rat via 1,500 electrodes. They had anticipated starting experiments with humans in 2020, but have since moved that projection to 2023. As of May 2023, they have been approved for human trials in the United States.\\nThe company has faced criticism for a large amount of euthanization of primates that underwent medical trials. Veterinary records of the monkeys showed a number of complications with electrodes being surgically implanted.\\nOn January 29, 2024, Musk said that Neuralink had successfully implanted a Neuralink device in a human and that the patient was recovering.\\n\\n', 'source': 'https://en.wikipedia.org/wiki/Neuralink'}), Document(page_content='Tesla, Inc. has been criticized for its cars, workplace culture, business practices, and occupational safety. Many of the criticisms are also directed toward Elon Musk, the company\\'s CEO and Product Architect. Critics have also accused Tesla of deceptive marketing, unfulfilled promises, and fraud. The company is currently facing criminal and civil investigations into its self-driving claims. Critics have highlighted Tesla\\'s downplaying of issues, and Tesla\\'s alleged retaliation against several whistleblowers.\\nThe safety and quality of Tesla cars and services have been questioned. There have been hundreds of now old reports of sudden unintended acceleration, brake failures, and \"whompy wheels\" – collapsing wheels due to faulty car suspension. These safety and quality problems have been compounded in the past by the poor wait times of Tesla\\'s customer service. Some features such as Autopilot, Full Self-Driving beta, and Passenger Play (a feature allowing riders to play Tesla games while in motion) have been criticized for their careless deployment. Critics have noted that some Tesla cars have had poor build quality due to rushed testing, leading to a high ratio of flawed vehicles. Others criticized the company\\'s \"stealth\" vehicle recalls, requiring customers to sign non-disclosure agreements.\\nRelationships between Musk, Tesla board members, employees, and unions have been complicated, partly resulting in a high turnover rate. Employees have reported poor treatment and policies, resulting in a high injury rate, with some having faced sexual harassment, racism, and union-busting incidents. Tesla\\'s environmental practices, use of cryptocurrencies, and compliance with open source licenses have been mentioned by critics. Detractors also claim that Tesla and Musk\\'s public relations activities have been used to deflect criticisms.\\nMusk and his company have been repeatedly accused of engaging in fraud, such as in their buyout of SolarCity, selling defective vehicles, overpromising, and posting reckless tweets. One tweet resulted in Musk agreeing to pay a fine and step down as Tesla\\'s chairman. Proponents and opponents of Tesla consistently accuse each other of conflict of interests, believing Tesla\\'s stock valuation is either under- or over-valued.\\n\\n\\n== Fraud allegations ==\\n\\n\\n=== SolarCity buyout ===\\n\\nThe so-described \"SolarCity debacle\" led a group of Tesla shareholders to file a lawsuit alleging Musk breached his fiduciary duties and unjustly enriched himself in Tesla\\'s buyout of SolarCity in 2016. The shareholders claim that Musk knew SolarCity was going broke before the buyout, that Musk failed to properly recuse himself from the deal-making process, and that the deal was, in effect, a bailout of Musk\\'s cousins Peter and Lyndon Rive. In order to gain shareholder support for the buyout, Musk unveiled the Solar Roof in October 2016, but the Solar Roof tiles that Musk displayed were later revealed to be fake. The trial was held in July 2021. The court ruled in Musk\\'s favor in April 2022. Some lawyers and legal academics criticized the ruling as a mistake and vulnerable to appeal. In June 2023, Delaware\\'s Supreme Court upheld the ruling.\\n\\n\\n=== \"Funding secured\" ===\\n\\n \\n \\n \\n\\n \\n \\n \\n\\nIn September 2018, the U.S. Securities and Exchange Commission (SEC) charged Musk with securities fraud for his \"false and misleading\" statements after tweeting that he had \"funding secured\" to take Tesla private. The SEC also charged Tesla with failing to have adequate controls and procedures in place regarding Musk\\'s tweets.\\nMusk settled the fraud charges with the SEC in 2018, agreeing to pay a $20 million fine and stepping down as Tesla\\'s chairman. Tesla also agreed to pay a $20 million fine and put in place additional controls to oversee Musk\\'s communications.\\nAccording to The Wall Street Journal, the SEC told Tesla in May 2020 that the company had failed \"to enforce these procedures and controls despite repeated violations by Mr. Musk\". ', metadata={'title': 'Criticism of Tesla, Inc.', 'summary': 'Tesla, Inc. has been criticized for its cars, workplace culture, business practices, and occupational safety. Many of the criticisms are also directed toward Elon Musk, the company\\'s CEO and Product Architect. Critics have also accused Tesla of deceptive marketing, unfulfilled promises, and fraud. The company is currently facing criminal and civil investigations into its self-driving claims. Critics have highlighted Tesla\\'s downplaying of issues, and Tesla\\'s alleged retaliation against several whistleblowers.\\nThe safety and quality of Tesla cars and services have been questioned. There have been hundreds of now old reports of sudden unintended acceleration, brake failures, and \"whompy wheels\" – collapsing wheels due to faulty car suspension. These safety and quality problems have been compounded in the past by the poor wait times of Tesla\\'s customer service. Some features such as Autopilot, Full Self-Driving beta, and Passenger Play (a feature allowing riders to play Tesla games while in motion) have been criticized for their careless deployment. Critics have noted that some Tesla cars have had poor build quality due to rushed testing, leading to a high ratio of flawed vehicles. Others criticized the company\\'s \"stealth\" vehicle recalls, requiring customers to sign non-disclosure agreements.\\nRelationships between Musk, Tesla board members, employees, and unions have been complicated, partly resulting in a high turnover rate. Employees have reported poor treatment and policies, resulting in a high injury rate, with some having faced sexual harassment, racism, and union-busting incidents. Tesla\\'s environmental practices, use of cryptocurrencies, and compliance with open source licenses have been mentioned by critics. Detractors also claim that Tesla and Musk\\'s public relations activities have been used to deflect criticisms.\\nMusk and his company have been repeatedly accused of engaging in fraud, such as in their buyout of SolarCity, selling defective vehicles, overpromising, and posting reckless tweets. One tweet resulted in Musk agreeing to pay a fine and step down as Tesla\\'s chairman. Proponents and opponents of Tesla consistently accuse each other of conflict of interests, believing Tesla\\'s stock valuation is either under- or over-valued.', 'source': 'https://en.wikipedia.org/wiki/Criticism_of_Tesla,_Inc.'}), Document(page_content='Talulah Jane Riley-Milburn (born 26 September 1985) is an English actress. She has appeared in films, including Pride & Prejudice (2005), St Trinian\\'s (2007) and its sequel St Trinian\\'s 2: The Legend of Fritton\\'s Gold (2009), The Boat That Rocked (2009), and Inception (2010). She has also appeared on the HBO science fiction western series Westworld (2016–2018) and the FX biographical miniseries Pistol (2022).\\n\\n\\n== Early life and education ==\\nTalulah Jane Riley-Milburn was born on 26 September 1985 in Hemel Hempstead in Hertfordshire where she grew up, as the only child of Una Riley, founder of a security systems company and a public relations company, and Doug Milburn, formerly head of the National Crime Squad. As of October 2021, her father works as a screenwriter and has written episodes of Silent Witness and The Bill. Riley was educated at Cheltenham Ladies\\' College, independent Berkhamsted Collegiate School, and Haberdashers\\' Girls\\' School. While acting in London, she studied for a degree in Natural Sciences at the Open University.\\n\\n\\n== Career ==\\n\\n\\n=== Television ===\\nRiley\\'s television credits include episodes of Poirot (2003), Marple (2006), Doctor Who (2008\\'s \"Silence in the Library\" and \"Forest of the Dead\"). She played Lila, a love-struck writer, in the short-lived E4 series Nearly Famous (2007). She played Angela in the first two seasons of the television series Westworld.\\n\\n\\n=== Stage ===\\nRiley made her stage debut in The Philadelphia Story at the Old Vic in 2005. Her performance in a 2006 revival Tennessee Williams\\' Summer and Smoke was described by critic Rachel Read as being \"delightful\".\\n\\n\\n=== Film ===\\nRiley played Mary Bennet in the 2005 version of Pride and Prejudice, acted in the role of Marianne in 2009\\'s The Boat That Rocked, and starred in the 2007 film St Trinian\\'s and its 2009 sequel St Trinian\\'s: The Legend of Fritton\\'s Gold.\\nRiley appeared as a disguise used by Tom Hardy\\'s character in Inception (2010). Also in 2010, Love and Distrust was released direct-to-video, featuring five unique short films; the first of these was The Summer House, in which Riley was co-lead, opposite Robert Pattinson. Available as a standalone download, The Summer House was the number one film on iTunes worldwide on its first day of release, holding that position for several days. She also appeared in White Frog.\\nBetween 2009 and 2015, Riley developed an idea and story by her father into a screenplay, then ultimately directed (after being unable to hire another director to helm the project) and starred in the resulting feature film Scottish Mussel.\\n\\n\\n=== Writing ===\\nHer debut novel, Acts of Love, was published by Hodder & Stoughton in August 2016. In June 2022, Riley released her second novel, The Quickening, also published by Hodder & Stoughton.\\n\\n\\n=== Other ===\\nShe was featured on the March 2010 cover of Esquire. In 2011, she was named a \"Brit to Watch\" by the British Academy of Film and Television Arts.\\n\\n\\n== Personal life ==\\nIn 2008, Riley began dating Elon Musk; they married in 2010 at Dornoch Cathedral in the highlands. In January 2012, Musk ended their relationship, and sought a divorce in March 2012.\\nIn July 2013, Musk and Riley remarried. In a 60 Minutes interview in 2014, the couple stated that they had reconciled and were living together again, along with Musk\\'s five children from his first marriage to writer Justine Musk. On 31 December 2014, Musk filed for divorce a second time although he later withdrew the action. After living separately for six months, Riley filed for a second divorce in Los Angeles Superior Court on 21 March 2016. The divorce was finalised in October 2016.\\nIn July 2022, it was reported that Riley was dating actor Thomas Brodie-Sangster after meeting while working together on Pistol. It was announced in July 2023 that Riley and Brodie-Sangster were engaged. The couple married on 22 June 2024 in Hertfordshire, United Kingdom.\\n\\nDuring Elon Musk\\'s acquisition of Twitter in October 2022, text exchange', metadata={'title': 'Talulah Riley', 'summary': \"Talulah Jane Riley-Milburn (born 26 September 1985) is an English actress. She has appeared in films, including Pride & Prejudice (2005), St Trinian's (2007) and its sequel St Trinian's 2: The Legend of Fritton's Gold (2009), The Boat That Rocked (2009), and Inception (2010). She has also appeared on the HBO science fiction western series Westworld (2016–2018) and the FX biographical miniseries Pistol (2022).\\n\\n\", 'source': 'https://en.wikipedia.org/wiki/Talulah_Riley'}), Document(page_content='Tesla, Inc. ( TESS-lə or TEZ-lə) is an American multinational automotive and clean energy company headquartered in Austin, Texas, which designs, manufactures and sells battery electric vehicles (BEVs), stationary battery energy storage devices from home to grid-scale, solar panels and solar shingles, and related products and services. The company is also developing artificial intelligence and robotics products.\\nTesla was incorporated in July 2003 by Martin Eberhard and Marc Tarpenning as Tesla Motors. The company\\'s name is a tribute to inventor and electrical engineer Nikola Tesla. In February 2004, Elon Musk joined as the company\\'s largest shareholder; in 2008, he was named chief executive officer. In 2008, the company began production of its first car model, the Roadster sports car, followed by the Model S sedan in 2012, the Model X SUV in 2015, the Model 3 sedan in 2017, the Model Y crossover in 2020, the Tesla Semi truck in 2022 and the Cybertruck pickup truck in 2023. The Model 3 is the all-time bestselling plug-in electric car worldwide, and in June 2021 became the first electric car to sell 1 million units globally. In 2023, the Model Y was the best-selling vehicle, of any kind, globally.\\nTesla is one of the world\\'s most valuable companies in terms of market capitalization. In October 2021, Tesla temporarily became a trillion dollar company, the seventh U.S. company to do so. In 2023, the company led the battery electric vehicle market, with 19.9% share. Also in 2023, the company was ranked 69th in the Forbes Global 2000. As of March 2024, it is the world\\'s most valuable automaker. Tesla has been the subject of lawsuits, government scrutiny, and journalistic criticism, stemming from allegations of whistleblower retaliation, worker rights violations, safety issues, product defects, fraud, and Musk\\'s many controversial statements.\\n\\n\\n== History ==\\n\\n\\n=== Founding (2003–2004) ===\\nThe company was incorporated as Tesla Motors, Inc. on July 1, 2003, by Martin Eberhard and Marc Tarpenning. They served as CEO and CFO, respectively. Eberhard said that he wanted to build \"a car manufacturer that is also a technology company\", with its core technologies as \"the battery, the computer software, and the proprietary motor\".\\nIan Wright was Tesla\\'s third employee, joining a few months later. In February 2004, the company raised US$7.5 million (equivalent to $12 million in 2023) in series A funding, including $6.5 million (equivalent to $10 million in 2023) from Elon Musk, who had received $100 million from the sale of his interest in PayPal two years earlier. Musk became the chairman of the board of directors and the largest shareholder of Tesla. J. B. Straubel joined Tesla in May 2004 as chief technical officer.\\nA lawsuit settlement agreed to by Eberhard and Tesla in September 2009 allows all five – Eberhard, Tarpenning, Wright, Musk, and Straubel – to call themselves co-founders.\\n\\n\\n=== Roadster (2005–2009) ===\\n\\nElon Musk took an active role within the company, but was not deeply involved in day-to-day business operations. The company\\'s strategy was to start with a premium sports car aimed at early adopters and then move into more mainstream vehicles, including sedans and affordable compacts.\\nIn February 2006, Musk led Tesla\\'s Series B venture capital funding round of $13 million, which added Valor Equity Partners to the funding team. Musk co-led the third, $40 million round in May 2006 which saw investment from prominent entrepreneurs including Google co-founders Sergey Brin and Larry Page, and former eBay President Jeff Skoll. A fourth round worth $45 million in May 2007 brought the total private financing investment to over $105 million.\\nIn August 2007, Eberhard was asked by the board, led by Elon Musk, to step down as CEO. Eberhard then took the title of \"President of Technology\" before ultimately leaving the company in January 2008. Co-founder Marc Tarpenning, who served as the Vice President of Electrical Engineering of the compan', metadata={'title': 'Tesla, Inc.', 'summary': \"Tesla, Inc. ( TESS-lə or TEZ-lə) is an American multinational automotive and clean energy company headquartered in Austin, Texas, which designs, manufactures and sells battery electric vehicles (BEVs), stationary battery energy storage devices from home to grid-scale, solar panels and solar shingles, and related products and services. The company is also developing artificial intelligence and robotics products.\\nTesla was incorporated in July 2003 by Martin Eberhard and Marc Tarpenning as Tesla Motors. The company's name is a tribute to inventor and electrical engineer Nikola Tesla. In February 2004, Elon Musk joined as the company's largest shareholder; in 2008, he was named chief executive officer. In 2008, the company began production of its first car model, the Roadster sports car, followed by the Model S sedan in 2012, the Model X SUV in 2015, the Model 3 sedan in 2017, the Model Y crossover in 2020, the Tesla Semi truck in 2022 and the Cybertruck pickup truck in 2023. The Model 3 is the all-time bestselling plug-in electric car worldwide, and in June 2021 became the first electric car to sell 1 million units globally. In 2023, the Model Y was the best-selling vehicle, of any kind, globally.\\nTesla is one of the world's most valuable companies in terms of market capitalization. In October 2021, Tesla temporarily became a trillion dollar company, the seventh U.S. company to do so. In 2023, the company led the battery electric vehicle market, with 19.9% share. Also in 2023, the company was ranked 69th in the Forbes Global 2000. As of March 2024, it is the world's most valuable automaker. Tesla has been the subject of lawsuits, government scrutiny, and journalistic criticism, stemming from allegations of whistleblower retaliation, worker rights violations, safety issues, product defects, fraud, and Musk's many controversial statements.\\n\\n\", 'source': 'https://en.wikipedia.org/wiki/Tesla,_Inc.'}), Document(page_content='Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future is Ashlee Vance\\'s biography of Elon Musk, published in 2015. The book traces Elon Musk\\'s life from his childhood up to the time he spent at Zip2 and PayPal, and then onto SpaceX, Tesla, and SolarCity. In the book, Vance interviews Musk, those close to him, and those who were with him at the most important points of his life; Musk had no control over the biography\\'s contents.\\n\\n\\n== Reception ==\\nThe Washington Post wrote that \"the book is a tremendous look into arguably the world\\'s most important entrepreneur. Vance paints an unforgettable picture of Musk\\'s unique personality, insatiable drive and ability to thrive through hardship.\" Dwight Garner, writing in The New York Times, wrote, \"Mr. Vance delivers a well-calibrated portrait of Mr. Musk, so that we comprehend both his friends and his enemies. It\\'s a book with many ancillary pleasures. Mr. Vance brings us up to date on the states of green energy and space launches. He also veers away from his subject just often enough, offering profiles of the frequently brilliant people who work alongside Mr. Musk. The best thing Mr. Vance does in this book, though, is tell Mr. Musk\\'s story simply and well.\" It was declared one of the best books of 2015 by The Wall Street Journal, NPR, Amazon.com, Fast Company and Audible.\\n\\n\\n== References ==', metadata={'title': 'Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future', 'summary': \"Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future is Ashlee Vance's biography of Elon Musk, published in 2015. The book traces Elon Musk's life from his childhood up to the time he spent at Zip2 and PayPal, and then onto SpaceX, Tesla, and SolarCity. In the book, Vance interviews Musk, those close to him, and those who were with him at the most important points of his life; Musk had no control over the biography's contents.\\n\\n\", 'source': 'https://en.wikipedia.org/wiki/Elon_Musk:_Tesla,_SpaceX,_and_the_Quest_for_a_Fantastic_Future'}), Document(page_content='ElonJet is a service that uses social media accounts to track the real-time private airplane usage of Elon Musk. The service, created and provided by Jack Sweeney using public data, has accounts on Facebook, Instagram, Telegram, Truth Social, Mastodon, Threads, and formerly on Twitter, where the Twitter account once had about 530,000 followers, before being suspended. Several of the social media accounts use the handle @elonjet.\\nThe Twitter account, created in June 2020, had been targeted by Musk beginning in 2021. He offered to pay Sweeney $5,000; Sweeney countered requesting $50,000 or an internship in one of Musk\\'s companies, and offered advice on restricting flight tracking data. Musk blocked Sweeney in January 2021. In late 2022, after Musk purchased Twitter, he announced he would not ban the ElonJet account. In December, a stalker followed Elon\\'s 2-year-old son while he was traveling in a car; the stalker thought Musk was in the car. After the incident, the account was restricted and then blocked along with Sweeney\\'s personal and other flight tracking accounts, as part of the December 2022 Twitter account suspensions. Later, shortly after the incident, accounts of several journalists were reinstated.\\nOn December 22, 2022, Sweeney started the new @ElonJetNextDay Twitter account, which continues to track the flights of Elon Musk\\'s private jets, but publishes flight location information on a 24-hour delay in compliance with Twitter\\'s new rules that \"sharing publicly available location information after a reasonable time has elapsed, so that the individual is no longer at risk for physical harm\" is not a violation.\\n\\n\\n== Function ==\\nThe ElonJet service uses publicly available flight data as well as an automated computer program, a Twitter bot, to report Elon Musk\\'s flights. The service uses ADS-B data, publicly available records, to give general information about where and when Musk\\'s private jet was taking off and landing, though it cannot indicate who is on board or where the passengers travel before or after the flight. The Twitter account in particular became a reliable way for Musk\\'s investors, fans, and critics to determine his whereabouts, often between the Austin area where he lives, the San Francisco Bay area where Tesla\\'s factory is, and Southern California, where SpaceX is headquartered.\\nAs of July 2023, the ElonJet service is hosted on Twitter, Facebook, Telegram, Instagram, Threads, Mastodon, and Bluesky accounts. The Mastodon account was created on December 14, 2022, a day after the original Twitter account was suspended. Sweeney has earned a few thousand dollars with the accounts, via ad revenue, allowing him to upgrade his computer. A subreddit dedicated to the service, r/ElonJetTracker, gained over 40,000 members in the two days since it was created on December 14, becoming one of the fastest-growing subreddits on the website.\\n\\n\\n== History ==\\nThe ElonJet Twitter account was started in June 2020 by Florida student Jack Sweeney. At the time, he was a high school senior, with his education suspended during the COVID-19 pandemic lockdown. Sweeney considered himself a fan of Musk\\'s work at SpaceX and Tesla, leading him to start the account.\\nElon Musk has had issues with the account for a long time, and offered Jack Sweeney $5,000 to delete the account in 2021. Sweeney countered asking for $50,000, saying he would use the money for college and possibly to buy a Tesla Model 3. Their last exchange was in January 2022, when Musk said it wouldn\\'t feel right to pay in order to shut the account down. Sweeney asked about the possibility of an internship at one of Musk\\'s companies, and offered Musk advice, including about a federal privacy program to vary the ID his transponder beamed out, thus blocking flight tracking programs. Musk began using the program, though Sweeney remained able to track Musk\\'s flights. Musk blocked Sweeney sometime after January 23.\\n\\nMusk purchased Twitter in October 2022, and announced early in t', metadata={'title': 'ElonJet', 'summary': 'ElonJet is a service that uses social media accounts to track the real-time private airplane usage of Elon Musk. The service, created and provided by Jack Sweeney using public data, has accounts on Facebook, Instagram, Telegram, Truth Social, Mastodon, Threads, and formerly on Twitter, where the Twitter account once had about 530,000 followers, before being suspended. Several of the social media accounts use the handle @elonjet.\\nThe Twitter account, created in June 2020, had been targeted by Musk beginning in 2021. He offered to pay Sweeney $5,000; Sweeney countered requesting $50,000 or an internship in one of Musk\\'s companies, and offered advice on restricting flight tracking data. Musk blocked Sweeney in January 2021. In late 2022, after Musk purchased Twitter, he announced he would not ban the ElonJet account. In December, a stalker followed Elon\\'s 2-year-old son while he was traveling in a car; the stalker thought Musk was in the car. After the incident, the account was restricted and then blocked along with Sweeney\\'s personal and other flight tracking accounts, as part of the December 2022 Twitter account suspensions. Later, shortly after the incident, accounts of several journalists were reinstated.\\nOn December 22, 2022, Sweeney started the new @ElonJetNextDay Twitter account, which continues to track the flights of Elon Musk\\'s private jets, but publishes flight location information on a 24-hour delay in compliance with Twitter\\'s new rules that \"sharing publicly available location information after a reasonable time has elapsed, so that the individual is no longer at risk for physical harm\" is not a violation.\\n\\n', 'source': 'https://en.wikipedia.org/wiki/ElonJet'}), Document(page_content='Crown Uzama (born April 12, 2000), known professionally as Shallipopi, is a Nigerian singer, rapper, and songwriter. He signed with Dvpper Music in 2023, and rose to fame with his single \"Elon Musk\". It moderately entered the TurnTable chart, while his debut studio album Presido La Pluto (2023) peaked at number one on the TurnTable Top 50 and debuted atop Apple Music top 100 albums. His second studio album, Shakespopi (2024), was met with continued success as it became Shallipopi\\'s second chart-topping album. Its lead single \"ASAP\" reached number one on the TurnTable Top 100.\\n\\n\\n== Career ==\\nShallipopi started his career creating and sharing freestyles on TikTok and other social media platforms. He gained a breakthrough with the release of his debut single \"Elon Musk\" in January 2023.\\nOn June 20, 2023, Apple Music announced Shallipopi as the latest featured artist in its Up Next program in Nigeria. He then released the remix of \"Elon Musk\" featuring Fireboy DML and Zlatan on June 30, followed by the single \"Ex-Convict\" on July 7, which debuted at number 6 on the TurnTable Top 100.\\nOn July 11, 2023, Shallipopi released his EP, Planet Pluto. Later that year, on October 17, 2023, he launched his own record label named Plutomania Records and simultaneously signed music acts Zerry DL and Tega Boi.\\n\\n\\n== Personal life ==\\nUzama graduated from Auchi Polytechnic in 2023 with a Computer Science degree.\\n\\n\\n== EFCC charges ==\\nOn 30 May 2023 the Economic and Financial Crimes Commission arrested Shallipopi, his manager and others for alleged Internet-related fraud. Shallipopi, his manager and others were convicted on 23 June 2023 and sentenced to two years imprisonment with the \"option of fines\".\\n\\n\\n== Discography ==\\n\\n\\n=== Albums ===\\n\\n\\n=== Singles ===\\n\\n\\n== References ==', metadata={'title': 'Shallipopi', 'summary': 'Crown Uzama (born April 12, 2000), known professionally as Shallipopi, is a Nigerian singer, rapper, and songwriter. He signed with Dvpper Music in 2023, and rose to fame with his single \"Elon Musk\". It moderately entered the TurnTable chart, while his debut studio album Presido La Pluto (2023) peaked at number one on the TurnTable Top 50 and debuted atop Apple Music top 100 albums. His second studio album, Shakespopi (2024), was met with continued success as it became Shallipopi\\'s second chart-topping album. Its lead single \"ASAP\" reached number one on the TurnTable Top 100.', 'source': 'https://en.wikipedia.org/wiki/Shallipopi'}), Document(page_content='Business magnate and technologist Elon Musk is recognized for his design and engineering work on Tesla vehicles and SpaceX rockets and his efforts to combat global warming. For his renewable energy work and advocacy, he has received several environmentalist awards, including the National Wildlife Federation\\'s Connie Award and a Global Green award. In part for his contributions to space travel, Musk was elected a Fellow of the Royal Society in 2018, was listed among the Time 100 Most Influential People in the World in 2010, 2013, 2018 and 2021, and was ranked joint-first on the Forbes list of the \"Most Innovative Leaders of 2019\". On December 13, 2021 Time magazine named him Person of the Year.\\n\\n\\n== Awards and honors ==\\n\\nIn 2006, Musk was a member of the United States National Academy of Sciences Aeronautics and Space Engineering Board.\\nInc. magazine Entrepreneur of the Year award for 2007 for his work on Tesla and SpaceX.\\n2007 Index Design award for his design of the Tesla Roadster. Global Green 2006 product design award for his design of the Tesla Roadster, presented by Mikhail Gorbachev.\\nAmerican Institute of Aeronautics and Astronautics George Low award for \"the most outstanding contribution in the field of space transportation in 2007/2008\". Musk was recognized for his design of the Falcon 1, the first privately developed liquid-fuel rocket to reach orbit.\\nNational Wildlife Federation 2008 National Conservation Achievement award for Tesla and SolarCity. Other 2008 recipients include journalist Thomas Friedman, U.S. Senator Patrick Leahy (D-VT), and Florida Governor Charlie Crist.\\nNational Space Society\\'s Von Braun Trophy in 2008/2009, given for leadership of \"the most significant achievement in space\". Prior recipients include Burt Rutan and Steve Squyres.\\nListed as one of Time\\'s 100 people who most affected the world in 2010.\\nThe world governing body for aerospace records, Fédération Aéronautique Internationale, presented Musk in 2010 with the highest award in air and space, the FAI Gold Space Medal, for designing the first privately developed rocket to reach orbit. Prior recipients include Neil Armstrong, Burt Rutan of Scaled Composites and John Glenn.\\nNamed as one of the 75 most influential people of the 21st century by Esquire magazine.\\nRecognized as a Living Legend of Aviation in 2010 by the Kitty Hawk Foundation for creating the successor to the Space Shuttle (Falcon 9 rocket and Dragon spacecraft). Other recipients include Buzz Aldrin and Richard Branson.\\nIn February 2011, Forbes listed Musk as one of \"America\\'s 20 Most Powerful CEOs 40 And Under.\"\\nIn June 2011, Musk was awarded the US$250,000 Heinlein Prize for Advances in Space Commercialization\\nIn 2012, Musk was awarded the Royal Aeronautical Society\\'s highest award: a gold medal.\\nIn 2013, Musk was named the Fortune Businessperson of the year for SpaceX, SolarCity, and Tesla.\\nAwarded the President\\'s award for Exploration and Technology of the Explorers Club at the annual gala on March 16, 2014.\\nIn 2014, Elon Musk was honored with an Edison Achievement Award for his \"commitment to innovation throughout his career\".\\n2015 at Yale\\'s 314th Commencement Ceremony, received Honorary Doctorate in Engineering and Technology.\\nIn 2015, he was awarded IEEE Honorary Membership.\\nIn June 2016, Business Insider named Musk one of the \"Top 10 Business Visionaries Creating Value for the World\" along with Mark Zuckerberg and Sal Khan.\\nIn May 2017, Musk was awarded the Oslo Business for Peace Award.\\nIn 2018, Musk was ranked 25th on Forbes list of The World\\'s Most Powerful People.\\nMusk was elected a Fellow of the Royal Society (FRS) in 2018.\\nListed among the Time 100 Most Influential People in the World in 2010, 2013, 2018 and 2021.\\nMusk was awarded as member (fifth class) of the Most Admirable Order of the Direkgunabhorn on March 4, 2019, for his contribution in the rescue at Tham Luang cave, Chiang Rai Province, Thailand.\\nIn 2019, Musk was awarded the Starmus Festival\\'s Stephen Haw', metadata={'title': 'List of awards and honors received by Elon Musk', 'summary': 'Business magnate and technologist Elon Musk is recognized for his design and engineering work on Tesla vehicles and SpaceX rockets and his efforts to combat global warming. For his renewable energy work and advocacy, he has received several environmentalist awards, including the National Wildlife Federation\\'s Connie Award and a Global Green award. In part for his contributions to space travel, Musk was elected a Fellow of the Royal Society in 2018, was listed among the Time 100 Most Influential People in the World in 2010, 2013, 2018 and 2021, and was ranked joint-first on the Forbes list of the \"Most Innovative Leaders of 2019\". On December 13, 2021 Time magazine named him Person of the Year.\\n\\n', 'source': 'https://en.wikipedia.org/wiki/List_of_awards_and_honors_received_by_Elon_Musk'}), Document(page_content='Twitter, Inc. was an American social media company based in San Francisco, California, which operated and was named for its flagship social media network prior to its rebrand as X. In addition to Twitter, the company previously operated the Vine short video app and Periscope livestreaming service. In April 2023, Twitter merged with X Holdings and ceased to be an independent company, becoming a part of X Corp.\\nTwitter was created by Jack Dorsey, Noah Glass, Biz Stone, and Evan Williams in March 2006 and was launched that July. By 2012, more than 100 million users tweeted 340 million tweets a day. The company went public in November 2013. By 2019, Twitter had more than 330 million monthly active users.\\nOn April 25, 2022, Twitter agreed to a $44 billion buyout by Elon Musk, CEO of SpaceX and Tesla, one of the biggest deals to turn a company private. On July 8, Musk terminated the deal. Twitter\\'s shares fell, leading company officials to sue Musk in Delaware\\'s Court of Chancery on July 12. On October 4, Musk announced his intention to purchase the company as he had agreed, for $44 billion, or $54.20 a share; the agreement closed on October 27.\\nFollowing Musk\\'s takeover, Twitter was criticized for an increase in hate speech, as well as for perceived systemic prioritization of right-wing content. His acquisition of the company has been characterized by large-scale policy changes, mass layoffs and resignations, and a dramatic shift in the company\\'s work culture.\\n\\n\\n== History ==\\n\\n\\n=== 2006–2007: Creation and initial reaction ===\\n\\nTwitter\\'s origins lie in a \"daylong brainstorming session\" held by board members of the podcasting company Odeo. Jack Dorsey, then an undergraduate student at New York University, introduced the idea of an individual using an SMS service to communicate with a small group. Work on the project started in February 2006. Dorsey published the first Twitter message on March 21, 2006, at 12:50 p.m. PST (UTC−08:00): \"just setting up my twttr\". The first Twitter prototype, developed by Dorsey and contractor Florian Weber, was used as an internal service for Odeo employees. The full version was introduced publicly on July 15, 2006. In October 2006, Biz Stone, Evan Williams, Dorsey, and other members of Odeo formed Obvious Corporation and acquired Odeo, together with its assets—including Odeo.com and Twitter.com—from the investors and shareholders. Williams fired Glass, who was silent about his part in Twitter\\'s startup until 2011. Twitter spun off into its own company in April 2007.\\nThe tipping point for Twitter\\'s popularity was the 2007 South by Southwest Interactive (SXSWi) conference. During the event, Twitter usage increased from 20,000 tweets per day to 60,000. \"The Twitter people cleverly placed two 60-inch plasma screens in the conference hallways, exclusively streaming Twitter messages,\" remarked Newsweek\\'s Steven Levy. \"Hundreds of conference-goers kept tabs on each other via constant twitters. Panelists and speakers mentioned the service, and the bloggers in attendance touted it.\" Reaction at the conference was highly positive. Blogger Scott Beale said that Twitter was \"absolutely ruling\" SXSWi. Social software researcher danah boyd said Twitter was \"owning\" the conference.\\n\\n\\n=== 2007–2022: Growth ===\\nIn April 2012, Twitter announced that it was opening an office in Detroit, with the aim of working with automotive brands and advertising agencies. Twitter also expanded its office in Dublin. Twitter hit 100 million monthly active users in September 2011. On December 18, 2012, Twitter announced it had surpassed 200 million monthly active users.\\nThe company had its initial public offering on the New York Stock Exchange on November 7, 2013.\\nIn September 2016, Twitter shares rose 20% after a report that it had received takeover approaches. Potential buyers were Alphabet (the parent company of Google), Microsoft, Salesforce.com, Verizon, and The Walt Disney Company. Twitter\\'s board of directors were open to a deal, ', metadata={'title': 'Twitter, Inc.', 'summary': \"Twitter, Inc. was an American social media company based in San Francisco, California, which operated and was named for its flagship social media network prior to its rebrand as X. In addition to Twitter, the company previously operated the Vine short video app and Periscope livestreaming service. In April 2023, Twitter merged with X Holdings and ceased to be an independent company, becoming a part of X Corp.\\nTwitter was created by Jack Dorsey, Noah Glass, Biz Stone, and Evan Williams in March 2006 and was launched that July. By 2012, more than 100 million users tweeted 340 million tweets a day. The company went public in November 2013. By 2019, Twitter had more than 330 million monthly active users.\\nOn April 25, 2022, Twitter agreed to a $44 billion buyout by Elon Musk, CEO of SpaceX and Tesla, one of the biggest deals to turn a company private. On July 8, Musk terminated the deal. Twitter's shares fell, leading company officials to sue Musk in Delaware's Court of Chancery on July 12. On October 4, Musk announced his intention to purchase the company as he had agreed, for $44 billion, or $54.20 a share; the agreement closed on October 27.\\nFollowing Musk's takeover, Twitter was criticized for an increase in hate speech, as well as for perceived systemic prioritization of right-wing content. His acquisition of the company has been characterized by large-scale policy changes, mass layoffs and resignations, and a dramatic shift in the company's work culture.\\n\\n\", 'source': 'https://en.wikipedia.org/wiki/Twitter,_Inc.'})]\n" - ] - } - ], - "source": [ - "source = \"Elon Musk\"\n", - "raw_documents = WikipediaLoader(query=source).load()\n", - "print(raw_documents)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Text to Graph example" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "# DiffbotGraphTransformer calls Diffbot Natural Language API to extract entities and relationships in the article\n", - "from langchain_experimental.graph_transformers.diffbot import DiffbotGraphTransformer\n", - "\n", - "diffbot_key = os.getenv(\"DIFFBOT_KEY\") \n", - "\n", - "diffbot_nlp = DiffbotGraphTransformer(diffbot_api_key=diffbot_key)\n", - "\n", - "# Diffbot's Natural Language API converts unstructured text data into knowlegde graphs\n", - "graph_documents = diffbot_nlp.convert_to_graph_documents(raw_documents)\n", - "\n", - "# add knowledge graph data to the neo4j database\n", - "graph.add_graph_documents(graph_documents)" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Nodes:[Node(id='http://www.wikidata.org/entity/Q6409751', type='Person', properties={'name': 'Kimbal Musk', 'academicDegree': 'bachelor', 'positionHeld': 'chairman', 'age': '18'}), Node(id='http://www.wikidata.org/entity/Q120599684', type='Organization', properties={'name': 'x.ai'}), Node(id='Tosca', type='Person', properties={'name': 'Tosca'}), Node(id='http://www.wikidata.org/entity/Q317521', type='Person', properties={'name': 'Elon Musk', 'dateOfBirth': '1971-06-28', 'positionHeld': 'businessman'}), Node(id='http://www.wikidata.org/entity/Q28874479', type='Organization', properties={'name': 'TBC - THE BORING COMPANY'}), Node(id='http://www.wikidata.org/entity/Q2460103', type='Skill', properties={'name': 'tunnel construction'}), Node(id='http://www.wikidata.org/entity/Q29043471', type='Organization', properties={'name': 'Neuralink'}), Node(id='http://www.wikidata.org/entity/Q24007468', type='Person', properties={'name': 'Maye Musk', 'positionHeld': 'model'}), Node(id='http://www.wikidata.org/entity/Q193701', type='Organization', properties={'name': 'SpaceX', 'foundingDate': '2002'}), Node(id='http://www.wikidata.org/entity/Q413', type='Skill', properties={'name': 'physics'}), Node(id='University of Pennsylvania', type='Organization', properties={'name': 'University of Pennsylvania'}), Node(id='http://www.wikidata.org/entity/Q8134', type='Skill', properties={'name': 'economics'}), Node(id='http://www.wikidata.org/entity/Q3926', type='Location', properties={'name': 'Pretoria'}), Node(id='http://www.wikidata.org/entity/Q145', type='Location', properties={'name': 'United Kingdom'}), Node(id='http://www.wikidata.org/entity/Q55', type='Location', properties={'name': 'Netherlands'}), Node(id='http://www.wikidata.org/entity/Q16', type='Location', properties={'name': 'Canada'}), Node(id='http://www.wikidata.org/entity/Q7555824', type='Organization', properties={'name': 'SolarCity'}), Node(id='spaceflight services', type='Skill', properties={'name': 'spaceflight services'}), Node(id='Errol Musk', type='Person', properties={'name': 'Errol Musk', 'positionHeld': 'pilot'}), Node(id='http://www.wikidata.org/entity/Q106868050', type='Organization', properties={'name': 'Tesla Energy'}), Node(id='http://www.wikidata.org/entity/Q478214', type='Organization', properties={'name': 'Tesla', 'productType': 'electric vehicle'}), Node(id='http://www.wikidata.org/entity/Q1420038', type='Organization', properties={'name': \"Queen's University\"}), Node(id='http://www.wikidata.org/entity/Q21708200', type='Organization', properties={'name': 'OpenAI'}), Node(id='http://www.wikidata.org/entity/Q604444', type='Organization', properties={'name': 'University of Pretoria'}), Node(id='http://www.wikidata.org/entity/Q28222602', type='Organization', properties={'name': 'Zip2'}), Node(id='online city guide software', type='Skill', properties={'name': 'online city guide software'}), Node(id='http://www.wikidata.org/entity/Q258', type='Location', properties={'name': 'South Africa'}), Node(id='http://www.wikidata.org/entity/Q99', type='Location', properties={'name': 'California'}), Node(id='http://www.wikidata.org/entity/Q918', type='Organization', properties={'name': 'Twitter'}), Node(id='http://www.wikidata.org/entity/Q1400', type='Location', properties={'name': 'Pennsylvania'}), Node(id='http://www.wikidata.org/entity/Q1989', type='Location', properties={'name': 'Saskatchewan'}), Node(id='http://www.wikidata.org/entity/Q190117', type='Skill', properties={'name': 'automotive industry'}), Node(id='X Corp.', type='Organization', properties={'name': 'X Corp.'}), Node(id='http://www.wikidata.org/entity/Q483959', type='Organization', properties={'name': 'PayPal'}), Node(id='eBay', type='Organization', properties={'name': 'eBay'})]\n", - "Relationships:[Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q120599684', type='Organization'), type='EMPLOYEE_OR_MEMBER_OF', properties={'evidence': 'In March 2023, Musk founded xAI, an artificial intelligence company.'}), Relationship(source=Node(id='Tosca', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='Tosca', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='Tosca', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), type='SIBLING', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q120599684', type='Organization'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='FOUNDED_BY', properties={'evidence': 'In March 2023, Musk founded xAI, an artificial intelligence company.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q28874479', type='Organization'), target=Node(id='http://www.wikidata.org/entity/Q2460103', type='Skill'), type='INDUSTRY', properties={'evidence': 'The following year, Musk co-founded Neuralink—a neurotechnology company developing brain–computer interfaces—and The Boring Company, a tunnel construction company.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q29043471', type='Organization'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='FOUNDED_BY', properties={'evidence': 'The following year, Musk co-founded Neuralink—a neurotechnology company developing brain–computer interfaces—and The Boring Company, a tunnel construction company.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q193701', type='Organization'), type='EMPLOYEE_OR_MEMBER_OF', properties={'evidence': 'Elon Reeve Musk (; born June 28, 1971) is a businessman and investor known for his key roles in space company SpaceX and automotive company Tesla, Inc.', 'isCurrent': 'true'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q413', type='Skill'), type='INTERESTED_IN', properties={'evidence': \"Musk later transferred to the University of Pennsylvania and received bachelor's degrees in economics and physics.\"}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q413', type='Skill'), type='INTERESTED_IN', properties={'evidence': \"Musk later transferred to the University of Pennsylvania and received bachelor's degrees in economics and physics.\"}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q413', type='Skill'), type='FIELD_OF_WORK', properties={'evidence': \"Musk later transferred to the University of Pennsylvania and received bachelor's degrees in economics and physics.\"}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), type='HAS_CHILD', properties={'evidence': 'His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='University of Pennsylvania', type='Organization'), type='EDUCATED_AT', properties={'evidence': \"Musk later transferred to the University of Pennsylvania and received bachelor's degrees in economics and physics.\", 'isNotCurrent': 'true'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='SIBLING', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q8134', type='Skill'), type='INTERESTED_IN', properties={'evidence': \"Musk later transferred to the University of Pennsylvania and received bachelor's degrees in economics and physics.\"}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q8134', type='Skill'), type='INTERESTED_IN', properties={'evidence': \"Musk later transferred to the University of Pennsylvania and received bachelor's degrees in economics and physics.\"}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q8134', type='Skill'), type='FIELD_OF_WORK', properties={'evidence': \"Musk later transferred to the University of Pennsylvania and received bachelor's degrees in economics and physics.\"}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q3926', type='Location'), type='PLACE_OF_BIRTH', properties={'evidence': \"Elon Reeve Musk was born on June 28, 1971, in Pretoria, South Africa's administrative capital.\"}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q3926', type='Location'), type='PERSON_LOCATION', properties={'evidence': \"Elon Reeve Musk was born on June 28, 1971, in Pretoria, South Africa's administrative capital.\"}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q145', type='Location'), type='GEOGRAPHIC_HERITAGE', properties={'evidence': 'He is of British and Pennsylvania Dutch ancestry.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q145', type='Location'), type='PERSON_LOCATION', properties={'evidence': 'He is of British and Pennsylvania Dutch ancestry.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q55', type='Location'), type='GEOGRAPHIC_HERITAGE', properties={'evidence': 'He is of British and Pennsylvania Dutch ancestry.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q16', type='Location'), type='GEOGRAPHIC_HERITAGE', properties={'evidence': 'His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q7555824', type='Organization'), type='EMPLOYEE_OR_MEMBER_OF', properties={'evidence': 'In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy.', 'isNotCurrent': 'true', 'startTime': '2006'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q193701', type='Organization'), target=Node(id='spaceflight services', type='Skill'), type='INDUSTRY', properties={'evidence': 'Using $100 million of the money he made from the sale of PayPal, Musk founded SpaceX, a spaceflight services company, in 2002.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q193701', type='Organization'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='FOUNDED_BY', properties={'evidence': 'Using $100 million of the money he made from the sale of PayPal, Musk founded SpaceX, a spaceflight services company, in 2002.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q16', type='Location'), type='PERSON_LOCATION', properties={'evidence': 'His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q16', type='Location'), type='PLACE_OF_BIRTH', properties={'evidence': 'His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa.'}), Relationship(source=Node(id='Errol Musk', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q16', type='Location'), type='PERSON_LOCATION', properties={'evidence': 'Musk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.'}), Relationship(source=Node(id='Errol Musk', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q16', type='Location'), type='PERSON_LOCATION', properties={'evidence': 'Musk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), type='SIBLING', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q7555824', type='Organization'), target=Node(id='http://www.wikidata.org/entity/Q106868050', type='Organization'), type='ACQUIRED_BY', properties={'evidence': 'In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy.', 'pointInTime': '2016'}), Relationship(source=Node(id='Tosca', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='Tosca', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='Tosca', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='SIBLING', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='Tosca', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='Tosca', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='Tosca', type='Person'), type='SIBLING', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q7555824', type='Organization'), target=Node(id='http://www.wikidata.org/entity/Q478214', type='Organization'), type='ACQUIRED_BY', properties={'evidence': 'In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy.', 'pointInTime': '2016'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q1420038', type='Organization'), type='EDUCATED_AT', properties={'evidence': \"Two years later, he matriculated at Queen's University at Kingston in Canada.\", 'isNotCurrent': 'true'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'Musk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'Musk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q478214', type='Organization'), type='EMPLOYEE_OR_MEMBER_OF', properties={'evidence': 'Elon Reeve Musk (; born June 28, 1971) is a businessman and investor known for his key roles in space company SpaceX and automotive company Tesla, Inc.', 'isNotCurrent': 'true'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q29043471', type='Organization'), type='EMPLOYEE_OR_MEMBER_OF', properties={'evidence': 'The following year, Musk co-founded Neuralink—a neurotechnology company developing brain–computer interfaces—and The Boring Company, a tunnel construction company.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'Musk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'Musk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q16', type='Location'), type='GEOGRAPHIC_HERITAGE', properties={'evidence': 'Musk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q16', type='Location'), type='PERSON_LOCATION', properties={'evidence': 'Musk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q16', type='Location'), type='PERSON_LOCATION', properties={'evidence': 'Musk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q29043471', type='Organization'), target=Node(id='http://www.wikidata.org/entity/Q2460103', type='Skill'), type='INDUSTRY', properties={'evidence': 'The following year, Musk co-founded Neuralink—a neurotechnology company developing brain–computer interfaces—and The Boring Company, a tunnel construction company.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='Errol Musk', type='Person'), type='HAS_PARENT', properties={'evidence': 'His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='Errol Musk', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='Errol Musk', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q21708200', type='Organization'), type='EMPLOYEE_OR_MEMBER_OF', properties={'evidence': 'In 2015, he co-founded OpenAI, a nonprofit artificial intelligence research company.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q7555824', type='Organization'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='FOUNDED_BY', properties={'evidence': 'In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q604444', type='Organization'), type='EDUCATED_AT', properties={'evidence': 'Musk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.', 'isNotCurrent': 'true'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), target=Node(id='Errol Musk', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), target=Node(id='Errol Musk', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q28222602', type='Organization'), target=Node(id='online city guide software', type='Skill'), type='INDUSTRY', properties={'evidence': 'He moved to California in 1995 to attend Stanford University, but dropped out after two days and, with his brother Kimbal, co-founded online city guide software company Zip2.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q258', type='Location'), type='PERSON_LOCATION', properties={'evidence': \"Elon Reeve Musk was born on June 28, 1971, in Pretoria, South Africa's administrative capital.\"}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q258', type='Location'), type='PLACE_OF_BIRTH', properties={'evidence': \"Elon Reeve Musk was born on June 28, 1971, in Pretoria, South Africa's administrative capital.\"}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q258', type='Location'), type='GEOGRAPHIC_HERITAGE', properties={'evidence': 'His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q99', type='Location'), type='PERSON_LOCATION', properties={'evidence': 'He moved to California in 1995 to attend Stanford University, but dropped out after two days and, with his brother Kimbal, co-founded online city guide software company Zip2.'}), Relationship(source=Node(id='Errol Musk', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), type='HAS_CHILD', properties={'evidence': 'His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve.'}), Relationship(source=Node(id='Errol Musk', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve.'}), Relationship(source=Node(id='Errol Musk', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q918', type='Organization'), type='EMPLOYEE_OR_MEMBER_OF', properties={'evidence': 'Other involvements include ownership of X Corp., formerly Twitter, and his role in the founding of The Boring Company, xAI, Neuralink and OpenAI.', 'isNotCurrent': 'true'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q1400', type='Location'), type='GEOGRAPHIC_HERITAGE', properties={'evidence': 'He is of British and Pennsylvania Dutch ancestry.'}), Relationship(source=Node(id='Errol Musk', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve.'}), Relationship(source=Node(id='Errol Musk', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q258', type='Location'), type='PERSON_LOCATION', properties={'evidence': 'His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='Tosca', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='Tosca', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='Tosca', type='Person'), type='SIBLING', properties={'evidence': 'Elon has a younger brother, Kimbal, and a younger sister, Tosca.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), type='FAMILY_MEMBER', properties={'evidence': 'His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), type='SOCIAL_RELATIONSHIP', properties={'evidence': 'His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), type='HAS_PARENT', properties={'evidence': 'His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q1989', type='Location'), type='PERSON_LOCATION', properties={'evidence': 'His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q24007468', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q1989', type='Location'), type='PLACE_OF_BIRTH', properties={'evidence': 'His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q1989', type='Location'), type='GEOGRAPHIC_HERITAGE', properties={'evidence': 'His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q190117', type='Skill'), type='INTERESTED_IN', properties={'evidence': 'Elon Reeve Musk (; born June 28, 1971) is a businessman and investor known for his key roles in space company SpaceX and automotive company Tesla, Inc.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q190117', type='Skill'), type='INTERESTED_IN', properties={'evidence': 'Elon Reeve Musk (; born June 28, 1971) is a businessman and investor known for his key roles in space company SpaceX and automotive company Tesla, Inc.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q21708200', type='Organization'), target=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), type='FOUNDED_BY', properties={'evidence': 'In 2015, he co-founded OpenAI, a nonprofit artificial intelligence research company.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q193701', type='Organization'), type='EMPLOYEE_OR_MEMBER_OF', properties={'evidence': 'Using $100 million of the money he made from the sale of PayPal, Musk founded SpaceX, a spaceflight services company, in 2002.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q317521', type='Person'), target=Node(id='X Corp.', type='Organization'), type='EMPLOYEE_OR_MEMBER_OF', properties={'evidence': 'Other involvements include ownership of X Corp., formerly Twitter, and his role in the founding of The Boring Company, xAI, Neuralink and OpenAI.', 'isCurrent': 'true'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q3926', type='Location'), type='PLACE_OF_BIRTH', properties={'evidence': 'Musk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q6409751', type='Person'), target=Node(id='http://www.wikidata.org/entity/Q3926', type='Location'), type='PERSON_LOCATION', properties={'evidence': 'Musk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.'}), Relationship(source=Node(id='http://www.wikidata.org/entity/Q483959', type='Organization'), target=Node(id='eBay', type='Organization'), type='ACQUIRED_BY', properties={'evidence': 'In October 2002, eBay acquired PayPal for $1.5 billion.', 'pointInTime': '2002-10'})]\n" - ] - } - ], - "source": [ - "print(f\"Nodes:{graph_documents[0].nodes}\")\n", - "print(f\"Relationships:{graph_documents[0].relationships}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Query Graph" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'Node properties:\\nAirport {longest: INTEGER, altitude: INTEGER, pagerank: FLOAT, descr: STRING, runways: INTEGER, id: STRING, icao: STRING, city: STRING, location: POINT, iata: STRING}\\nCity {name: STRING}\\nRegion {name: STRING}\\nCountry {code: STRING}\\nContinent {name: STRING}\\nPerson {name: STRING, id: STRING, dateOfBirth: STRING, positionHeld: STRING, age: STRING, academicDegree: STRING, numberOfChildren: STRING}\\nOrganization {name: STRING, foundingDate: STRING, id: STRING, productType: STRING}\\nSkill {id: STRING, name: STRING}\\nLocation {name: STRING, id: STRING}\\nAward {name: STRING, id: STRING}\\nRelationship properties:\\nHAS_ROUTE {distance: INTEGER}\\nEMPLOYEE_OR_MEMBER_OF {evidence: STRING, isCurrent: STRING, isNotCurrent: STRING, startTime: STRING, positionHeld: STRING, endTime: STRING}\\nINDUSTRY {evidence: STRING}\\nFOUNDED_BY {evidence: STRING}\\nPLACE_OF_BIRTH {evidence: STRING}\\nPERSON_LOCATION {evidence: STRING, startTime: STRING, isNotCurrent: STRING, isCurrent: STRING}\\nFAMILY_MEMBER {evidence: STRING, startTime: STRING, isNotCurrent: STRING}\\nSOCIAL_RELATIONSHIP {evidence: STRING, startTime: STRING, isNotCurrent: STRING}\\nSIBLING {evidence: STRING}\\nINTERESTED_IN {evidence: STRING}\\nFIELD_OF_WORK {evidence: STRING}\\nEDUCATED_AT {evidence: STRING, isNotCurrent: STRING, endTime: STRING, isCurrent: STRING}\\nGEOGRAPHIC_HERITAGE {evidence: STRING}\\nACQUIRED_BY {evidence: STRING, pointInTime: STRING}\\nHAS_PARENT {evidence: STRING}\\nHAS_CHILD {evidence: STRING}\\nWORK_RELATIONSHIP {evidence: STRING}\\nCHIEF_EXECUTIVE_OFFICER {evidence: STRING, isCurrent: STRING, isNotCurrent: STRING, endTime: STRING}\\nPOLITICAL_AFFILIATION {evidence: STRING}\\nROMANTIC_RELATIONSHIP {evidence: STRING, startTime: STRING, isNotCurrent: STRING}\\nSPOUSE {evidence: STRING, startTime: STRING, isNotCurrent: STRING}\\nORGANIZATION_LOCATIONS {evidence: STRING, isCurrent: STRING, startTime: STRING, isNotCurrent: STRING}\\nNATIONALITY {evidence: STRING}\\nBOARD_MEMBER {evidence: STRING, isCurrent: STRING, isNotCurrent: STRING, startTime: STRING, endTime: STRING}\\nPARENT_ORGANIZATION {evidence: STRING, startTime: STRING}\\nSUBSIDIARY {evidence: STRING, startTime: STRING}\\nAUTHOR_OF {evidence: STRING, pointInTime: STRING}\\nCONTRIBUTED_TO {evidence: STRING}\\nAWARDS {evidence: STRING}\\nBRANDS {evidence: STRING}\\nThe relationships:\\n(:Airport)-[:IN_CITY]->(:City)\\n(:Airport)-[:IN_COUNTRY]->(:Country)\\n(:Airport)-[:IN_REGION]->(:Region)\\n(:Airport)-[:ON_CONTINENT]->(:Continent)\\n(:Airport)-[:HAS_ROUTE]->(:Airport)\\n(:City)-[:IN_COUNTRY]->(:Country)\\n(:City)-[:IN_REGION]->(:Region)\\n(:City)-[:ON_CONTINENT]->(:Continent)\\n(:Region)-[:ON_CONTINENT]->(:Continent)\\n(:Region)-[:IN_COUNTRY]->(:Country)\\n(:Country)-[:ON_CONTINENT]->(:Continent)\\n(:Person)-[:EMPLOYEE_OR_MEMBER_OF]->(:Organization)\\n(:Person)-[:PLACE_OF_BIRTH]->(:Location)\\n(:Person)-[:PERSON_LOCATION]->(:Location)\\n(:Person)-[:PERSON_LOCATION]->(:Organization)\\n(:Person)-[:FAMILY_MEMBER]->(:Person)\\n(:Person)-[:SOCIAL_RELATIONSHIP]->(:Person)\\n(:Person)-[:SIBLING]->(:Person)\\n(:Person)-[:INTERESTED_IN]->(:Skill)\\n(:Person)-[:GEOGRAPHIC_HERITAGE]->(:Location)\\n(:Person)-[:HAS_PARENT]->(:Person)\\n(:Person)-[:WORK_RELATIONSHIP]->(:Person)\\n(:Person)-[:POLITICAL_AFFILIATION]->(:Organization)\\n(:Person)-[:ROMANTIC_RELATIONSHIP]->(:Person)\\n(:Person)-[:SPOUSE]->(:Person)\\n(:Person)-[:NATIONALITY]->(:Location)\\n(:Person)-[:AWARDS]->(:Award)\\n(:Person)-[:FIELD_OF_WORK]->(:Skill)\\n(:Person)-[:EDUCATED_AT]->(:Organization)\\n(:Person)-[:HAS_CHILD]->(:Person)\\n(:Person)-[:AUTHOR_OF]->(:Skill)\\n(:Person)-[:CONTRIBUTED_TO]->(:Location)\\n(:Organization)-[:CHIEF_EXECUTIVE_OFFICER]->(:Person)\\n(:Organization)-[:FOUNDED_BY]->(:Person)\\n(:Organization)-[:INDUSTRY]->(:Skill)\\n(:Organization)-[:BOARD_MEMBER]->(:Person)\\n(:Organization)-[:SUBSIDIARY]->(:Organization)\\n(:Organization)-[:ORGANIZATION_LOCATIONS]->(:Location)\\n(:Organization)-[:ACQUIRED_BY]->(:Organization)\\n(:Organization)-[:PARENT_ORGANIZATION]->(:Organization)\\n(:Organization)-[:BRANDS]->(:Organization)'" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "graph.schema" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [], - "source": [ - "# Init LLM Search in Graph\n", - "from langchain.chains import GraphCypherQAChain\n", - "\n", - "initial_context_from_knowledge_graph = GraphCypherQAChain.from_llm(\n", - " cypher_llm=llm, \n", - " qa_llm=llm, \n", - " graph=graph,\n", - " validate_cypher=True, \n", - " verbose=True\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "#query = \"Who are the companies that Elon Musk co-founded and their subsidieries?\"\n", - "#query = \"how many companies Elon Musk founded including names?\"\n", - "query = \"Could you provide a list of subsidiaries for the companies founded by Elon Musk?\"" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Could you provide a list of subsidiaries for the companies founded by Elon Musk?\n", - "\n", - "\n", - "\u001b[1m> Entering new GraphCypherQAChain chain...\u001b[0m\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "c:\\Users\\yanivvaknin\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\langchain_core\\_api\\deprecation.py:139: LangChainDeprecationWarning: The method `Chain.run` was deprecated in langchain 0.1.0 and will be removed in 0.3.0. Use invoke instead.\n", - " warn_deprecated(\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Generated Cypher:\n", - "\u001b[32;1m\u001b[1;3mMATCH (p:Person)<-[:FOUNDED_BY]-(o:Organization)-[:SUBSIDIARY]->(s:Organization)\n", - "WHERE p.name = 'Elon Musk'\n", - "RETURN o.name AS Company, collect(s.name) AS Subsidiaries\u001b[0m\n", - "Full Context:\n", - "\u001b[32;1m\u001b[1;3m[{'Company': 'SpaceX', 'Subsidiaries': ['TBC - THE BORING COMPANY']}]\u001b[0m\n", - "\n", - "\u001b[1m> Finished chain.\u001b[0m\n" - ] - }, - { - "data": { - "text/plain": [ - "'SpaceX, a company founded by Elon Musk, has a subsidiary named TBC - The Boring Company.'" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Knowledge Graph Instructions and Query\n", - "rules = \"\"\"\n", - "# Knowledge Graph Instructions:\n", - "## 1. Overview\n", - "You are a top-tier algorithm designed for extracting information in structured formats to build a knowledge graph.\n", - "- **Nodes** represent entities and concepts. They're akin to Wikipedia nodes.\n", - "- The aim is to achieve simplicity and clarity in the knowledge graph, making it accessible for a vast audience.\n", - "## 2. Labeling Nodes\n", - "- **Consistency**: Ensure you use basic or elementary types for node labels.\n", - " - For example, when you identify an entity representing a person, always label it as **\"person\"**. Avoid using more specific terms like \"mathematician\" or \"scientist\".\n", - "- **Node IDs**: Never utilize integers as node IDs. Node IDs should be names or human-readable identifiers found in the text.\n", - "{'- **Allowed Node Labels:**' + \", \".join(allowed_nodes) if allowed_nodes else \"\"}\n", - "{'- **Allowed Relationship Types**:' + \", \".join(allowed_rels) if allowed_rels else \"\"}\n", - "## 3. Handling Numerical Data and Dates\n", - "- Numerical data, like age or other related information, should be incorporated as attributes or properties of the respective nodes.\n", - "- **No Separate Nodes for Dates/Numbers**: Do not create separate nodes for dates or numerical values. Always attach them as attributes or properties of nodes.\n", - "- **Property Format**: Properties must be in a key-value format.\n", - "- **Quotation Marks**: Never use escaped single or double quotes within property values.\n", - "- **Naming Convention**: Use camelCase for property keys, e.g., `birthDate`.\n", - "## 4. Coreference Resolution\n", - "- **Maintain Entity Consistency**: When extracting entities, it's vital to ensure consistency, and not duplicate entities.\n", - "If an entity, such as \"John Doe\", is mentioned multiple times in the text but is referred to by different names or pronouns (e.g., \"Joe\", \"he\"), \n", - "always use the most complete identifier for that entity throughout the knowledge graph. In this example, use \"John Doe\" as the entity ID. \n", - "Remember, the knowledge graph should be coherent and easily understandable, so maintaining consistency in entity references is crucial. \n", - "\"\"\"\n", - "question_elon = f\"{query}, {rules}\"\n", - "print(query)\n", - "kg_context = initial_context_from_knowledge_graph.run(question_elon)\n", - "kg_context\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Azure Vecotr Search" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], - "source": [ - "service_endpoint = os.getenv(\"AZURE_SEARCH_ENDPOINT\")\n", - "index_name =os.getenv(\"AZURE_SEARCH_INDEX\")\n", - "key = os.getenv(\"AZURE_SEARCH_API_KEY\")#azure_search_key\n", - "\n", - "def get_embeddings(text: str):\n", - " # There are a few ways to get embeddings. This is just one example.\n", - "\n", - " open_ai_endpoint = os.getenv(\"AZURE_OPENAI_ENDPOINT\")\n", - " open_ai_key = os.getenv(\"AZURE_OPENAI_API_KEY\")\n", - "\n", - " client = openai.AzureOpenAI(\n", - " azure_endpoint=open_ai_endpoint,\n", - " api_key=open_ai_key,\n", - " api_version=os.getenv(\"AZURE_OPENAI_API_VERSION\"),\n", - " )\n", - " embedding = client.embeddings.create(input=[text], model=azure_embedding)\n", - " return embedding.data[0].embedding" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Vector Search" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [], - "source": [ - "from azure.search.documents import SearchClient\n", - "from azure.search.documents.models import VectorizedQuery\n", - "search_client = SearchClient(service_endpoint, index_name, AzureKeyCredential(key))\n", - "vector_query = VectorizedQuery(vector=get_embeddings(query), k_nearest_neighbors=3, fields=\"text_vector\")" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'chunk': \"[Document(page_content='Elon Reeve Musk (; born June 28, 1971) is a businessman and investor known for his key roles in space company SpaceX and automotive company Tesla, Inc. Other involvements include ownership of X Corp., formerly Twitter, and his role in the founding of The Boring Company, xAI, Neuralink and OpenAI. He is one of the wealthiest people in the world; as of June 2024, Forbes estimates his net worth to be US$214 billion.\\\\nMusk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother. Two years later, he matriculated at Queen\\\\'s University at Kingston in Canada. Musk later transferred to the University of Pennsylvania and received bachelor\\\\'s degrees in economics and physics. He moved to California in 1995 to attend Stanford University, but dropped out after two days and, with his brother Kimbal, co-founded online city guide software company Zip2. The startup was acquired by Compaq for $307 million in 1999. That same year, Musk co-founded X.com, a direct bank. X.com merged with Confinity in 2000 to form PayPal. In October 2002, eBay acquired PayPal for $1.5 billion. Using $100 million of the money he made from the sale of PayPal, Musk founded SpaceX, a spaceflight services company, in 2002. \\\\nIn 2004, Musk was an early investor in electric vehicle manufacturer Tesla Motors, Inc. (later Tesla, Inc.). He became the company\\\\'s chairman and product architect, assuming the position of CEO in 2008. In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy. In 2013, he proposed a hyperloop high-speed vactrain transportation system. In 2015, he co-founded OpenAI, a nonprofit artificial intelligence research company.\", 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_0', '@search.score': 0.8536951, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'in 2002. \\\\nIn 2004, Musk was an early investor in electric vehicle manufacturer Tesla Motors, Inc. (later Tesla, Inc.). He became the company\\\\\\'s chairman and product architect, assuming the position of CEO in 2008. In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy. In 2013, he proposed a hyperloop high-speed vactrain transportation system. In 2015, he co-founded OpenAI, a nonprofit artificial intelligence research company. The following year, Musk co-founded Neuralink—a neurotechnology company developing brain–computer interfaces—and The Boring Company, a tunnel construction company. In 2018, the U.S. Securities and Exchange Commission (SEC) sued Musk, alleging that he had falsely announced that he had secured funding for a private takeover of Tesla. To settle the case, Musk stepped down as the chairman of Tesla and paid a $20 million fine. In 2022, he acquired Twitter for $44 billion. He subsequently merged the company into newly created X Corp. and rebranded the service as X the following year. In March 2023, Musk founded xAI, an artificial intelligence company.\\\\nMusk has expressed views that have made him a polarizing figure. He has been criticized for making unscientific and misleading statements, including COVID-19 misinformation, promoting right-wing conspiracy theories, and \"endorsing\" antisemitic conspiracy theories, the latter of which he later apologized for. His ownership of Twitter has been similarly controversial, being marked by layoffs of large numbers of employees, an increase in hate speech, misinformation and disinformation posts on the website, and changes to Twitter Blue verification.\\\\n\\\\n\\\\n== Early life and education ==\\\\n\\\\n\\\\n=== Childhood and family ===\\\\nElon Reeve Musk was born on June 28, 1971, in Pretoria, South Africa\\\\\\'s administrative capital. He is of British and Pennsylvania Dutch ancestry.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_1', '@search.score': 0.8530275, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'architect, assuming the position of CEO in 2008. In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy. In 2013, he proposed a hyperloop high-speed vactrain transportation system. In 2015, he co-founded OpenAI, a nonprofit artificial intelligence research company. The following year, Musk co-founded Neuralink—a neurotechnology company developing brain–computer interfaces—and The Boring Company, a tunnel construction company. In 2018, the U.S. Securities and Exchange Commission (SEC) sued Musk, alleging that he had falsely announced that he had secured funding for a private takeover of Tesla. To settle the case, Musk stepped down as the chairman of Tesla and paid a $20 million fine. In 2022, he acquired Twitter for $44 billion. He subsequently merged the company into newly created X Corp. and rebranded the service as X the following year. In March 2023, Musk founded xAI, an artificial intelligence company.\\\\nMusk has expressed views that have made him a polarizing figure. He has been criticized for making unscientific and misleading statements, including COVID-19 misinformation, promoting right-wing conspiracy theories, and \"endorsing\" antisemitic conspiracy theories, the latter of which he later apologized for. His ownership of Twitter has been similarly controversial, being marked by layoffs of large numbers of employees, an increase in hate speech, misinformation and disinformation posts on the website, and changes to Twitter Blue verification.\\', \\'source\\': \\'https://en.wikipedia.org/wiki/Elon_Musk\\'}), Document(page_content=\\'Elon Musk completed his acquisition of Twitter in October 2022; Musk acted as CEO of Twitter until June 2023 when he was succeeded by Linda Yaccarino. Under Musk, Twitter was rebranded to X. It is one of the top social media platforms and the seventh-most visited website in the world.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_4', '@search.score': 0.8471938, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n" - ] - } - ], - "source": [ - "results = search_client.search(\n", - " vector_queries=[vector_query],\n", - " select=[\"chunk_id\",\"chunk\"]\n", - ")\n", - "\n", - "result_array = []\n", - "for result in results:\n", - " print(result)\n", - " result_array.append(result)\n", - "# [END single_vector_search]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Multi Search" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'chunk': \"[Document(page_content='Elon Reeve Musk (; born June 28, 1971) is a businessman and investor known for his key roles in space company SpaceX and automotive company Tesla, Inc. Other involvements include ownership of X Corp., formerly Twitter, and his role in the founding of The Boring Company, xAI, Neuralink and OpenAI. He is one of the wealthiest people in the world; as of June 2024, Forbes estimates his net worth to be US$214 billion.\\\\nMusk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother. Two years later, he matriculated at Queen\\\\'s University at Kingston in Canada. Musk later transferred to the University of Pennsylvania and received bachelor\\\\'s degrees in economics and physics. He moved to California in 1995 to attend Stanford University, but dropped out after two days and, with his brother Kimbal, co-founded online city guide software company Zip2. The startup was acquired by Compaq for $307 million in 1999. That same year, Musk co-founded X.com, a direct bank. X.com merged with Confinity in 2000 to form PayPal. In October 2002, eBay acquired PayPal for $1.5 billion. Using $100 million of the money he made from the sale of PayPal, Musk founded SpaceX, a spaceflight services company, in 2002. \\\\nIn 2004, Musk was an early investor in electric vehicle manufacturer Tesla Motors, Inc. (later Tesla, Inc.). He became the company\\\\'s chairman and product architect, assuming the position of CEO in 2008. In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy. In 2013, he proposed a hyperloop high-speed vactrain transportation system. In 2015, he co-founded OpenAI, a nonprofit artificial intelligence research company.\", 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_0', '@search.score': 0.03333333507180214, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'architect, assuming the position of CEO in 2008. In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy. In 2013, he proposed a hyperloop high-speed vactrain transportation system. In 2015, he co-founded OpenAI, a nonprofit artificial intelligence research company. The following year, Musk co-founded Neuralink—a neurotechnology company developing brain–computer interfaces—and The Boring Company, a tunnel construction company. In 2018, the U.S. Securities and Exchange Commission (SEC) sued Musk, alleging that he had falsely announced that he had secured funding for a private takeover of Tesla. To settle the case, Musk stepped down as the chairman of Tesla and paid a $20 million fine. In 2022, he acquired Twitter for $44 billion. He subsequently merged the company into newly created X Corp. and rebranded the service as X the following year. In March 2023, Musk founded xAI, an artificial intelligence company.\\\\nMusk has expressed views that have made him a polarizing figure. He has been criticized for making unscientific and misleading statements, including COVID-19 misinformation, promoting right-wing conspiracy theories, and \"endorsing\" antisemitic conspiracy theories, the latter of which he later apologized for. His ownership of Twitter has been similarly controversial, being marked by layoffs of large numbers of employees, an increase in hate speech, misinformation and disinformation posts on the website, and changes to Twitter Blue verification.\\', \\'source\\': \\'https://en.wikipedia.org/wiki/Elon_Musk\\'}), Document(page_content=\\'Elon Musk completed his acquisition of Twitter in October 2022; Musk acted as CEO of Twitter until June 2023 when he was succeeded by Linda Yaccarino. Under Musk, Twitter was rebranded to X. It is one of the top social media platforms and the seventh-most visited website in the world.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_4', '@search.score': 0.032522473484277725, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'in 2002. \\\\nIn 2004, Musk was an early investor in electric vehicle manufacturer Tesla Motors, Inc. (later Tesla, Inc.). He became the company\\\\\\'s chairman and product architect, assuming the position of CEO in 2008. In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy. In 2013, he proposed a hyperloop high-speed vactrain transportation system. In 2015, he co-founded OpenAI, a nonprofit artificial intelligence research company. The following year, Musk co-founded Neuralink—a neurotechnology company developing brain–computer interfaces—and The Boring Company, a tunnel construction company. In 2018, the U.S. Securities and Exchange Commission (SEC) sued Musk, alleging that he had falsely announced that he had secured funding for a private takeover of Tesla. To settle the case, Musk stepped down as the chairman of Tesla and paid a $20 million fine. In 2022, he acquired Twitter for $44 billion. He subsequently merged the company into newly created X Corp. and rebranded the service as X the following year. In March 2023, Musk founded xAI, an artificial intelligence company.\\\\nMusk has expressed views that have made him a polarizing figure. He has been criticized for making unscientific and misleading statements, including COVID-19 misinformation, promoting right-wing conspiracy theories, and \"endorsing\" antisemitic conspiracy theories, the latter of which he later apologized for. His ownership of Twitter has been similarly controversial, being marked by layoffs of large numbers of employees, an increase in hate speech, misinformation and disinformation posts on the website, and changes to Twitter Blue verification.\\\\n\\\\n\\\\n== Early life and education ==\\\\n\\\\n\\\\n=== Childhood and family ===\\\\nElon Reeve Musk was born on June 28, 1971, in Pretoria, South Africa\\\\\\'s administrative capital. He is of British and Pennsylvania Dutch ancestry.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_1', '@search.score': 0.03154495730996132, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': \"and automotive company Tesla, Inc. Other involvements include ownership of X Corp., formerly Twitter, and his role in the founding of The Boring Company, xAI, Neuralink and OpenAI. He is one of the wealthiest people in the world; as of June 2024, Forbes estimates his net worth to be US$214 billion.\\\\nMusk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother. Two years later, he matriculated at Queen\\\\'s University at Kingston in Canada. Musk later transferred to the University of Pennsylvania and received bachelor\\\\'s degrees in economics and physics. He moved to California in 1995 to attend Stanford University, but dropped out after two days and, with his brother Kimbal, co-founded online city guide software company Zip2. The startup was acquired by Compaq for $307 million in 1999. That same year, Musk co-founded X.com, a direct bank. X.com merged with Confinity in 2000 to form PayPal. In October 2002, eBay acquired PayPal for $1.5 billion. Using $100 million of the money he made from the sale of PayPal, Musk founded SpaceX, a spaceflight services company, in 2002. \\\\nIn 2004, Musk was an early investor in electric vehicle manufacturer Tesla Motors, Inc. (later Tesla, Inc.). He became the company\\\\'s chairman and product architect, assuming the position of CEO in 2008. In 2006, Musk helped create SolarCity, a solar-energy company that was acquired by Tesla in 2016 and became Tesla Energy. In 2013, he proposed a hyperloop high-speed vactrain transportation system. In 2015, he co-founded OpenAI, a nonprofit artificial intelligence research company. The following year, Musk co-founded Neuralink—a neurotechnology company developing brain–computer interfaces—and The Boring Company, a tunnel construction company.\", 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_3', '@search.score': 0.016129031777381897, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': \"the Twitter service was rebranded as X.\\\\nReactions to the buyout were mixed, with praise for Musk\\\\'s planned reforms and vision for the company, particularly his calls for greater free speech, but criticism over fears of a potential rise in misinformation and disinformation, harassment, and hate speech on the platform. Within the United States, conservatives have largely supported the acquisition, while many liberals and former Twitter employees have voiced concerns about Musk\\\\'s intentions. Since becoming owner, Musk has faced backlash for his handling of the company and account suspensions, including the December 2022 suspensions of ten journalists.\\\\n\\\\n', 'source': 'https://en.wikipedia.org/wiki/Acquisition_of_Twitter_by_Elon_Musk'}), Document(page_content='Elon Musk made $175.8 million when PayPal was sold to eBay in October 2002. He was first listed on the Forbes Billionaires List in 2012, with a net worth of $2 billion. He is the founder, chairman, CEO, and CTO of SpaceX; angel investor, CEO, product architect, and former chairman of Tesla, Inc.; owner, executive chairman, and CTO of X Corp.; founder of the Boring Company and xAI; co-founder of Neuralink and OpenAI; and president of the Musk Foundation. He is one of the wealthiest people in the world, with an estimated net worth of US$191 billion as of April 2024, according to the Bloomberg Billionaires Index, and $182.6 billion according to Forbes, primarily from his ownership stakes in Tesla and SpaceX.\\\\n\\\\n\\\\n== Details ==\\\\nAt the start of 2020, Elon Musk had a net worth of $27 billion. By the end of the year his net worth had increased by $150 billion, mostly driven by his ownership of around 20% of Tesla stock. During this period, Musk\\\\'s net worth was often volatile. For example, it dropped $16.3 billion on September 8, the largest single-day plunge in Bloomberg Billionaires Index\\\\'s history at the time.\", 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_18', '@search.score': 0.01587301678955555, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'Town Rally with a Ford Ranch-Wagon 5.4L and finished tied for 1st place.\\\\nAs her parents were entrepreneurs, Musk started working at about 8 years of age, where she would \"prepare her parents monthly bulletins and photocopy newsletters, and then put the stamps on the envelopes.” By the age of 12, before and then after school, Musk worked as a receptionist alongside her twin sister for their father. \\\\nAs a young woman, Haldeman was a finalist in the 1969 Miss South Africa beauty competition. In 1970, she married Errol Musk, a South African engineer she met in high school. They had three children: Elon Musk, Kimbal Musk, and Tosca Musk. She named Elon after her American grandfather, John Elon Haldeman (born in Illinois). \\\\nIn 1979, she divorced Errol Musk. Two years later, Elon, who was about 10 at the time, decided to live with his father, as he had the Encyclopaedia Britannica, and a computer, things which Maye could not afford to give the children, as a single parent. Kimbal joined Elon four years later. After graduating from high school, Elon decided to move to Canada; in 1989, six months later, Maye moved to Canada with her da', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_23', '@search.score': 0.015625, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'package via new shareholders votes.\\\\nMusk paid $455 million in taxes on $1.52 billion of income between 2014 and 2018. According to ProPublica, Musk paid no federal income taxes in 2018. He stated his 2021 tax bill was estimated at $12 billion based on his sale of $14 billion worth of Tesla stock.\\\\nMusk has repeatedly described himself as \"cash poor\", and has \"professed to have little interest in the material trappings of wealth\". In May 2020, he pledged to sell almost all physical possessions. Musk has defended his wealth by saying he is accumulating resources for humanity\\\\\\'s outwar\\', metadata={\\'title\\': \\'Wealth of Elon Musk\\', \\'summary\\': \\'Elon Musk made $175.8 million when PayPal was sold to eBay in October 2002. He was first listed on the Forbes Billionaires List in 2012, with a net worth of $2 billion. He is the founder, chairman, CEO, and CTO of SpaceX; angel investor, CEO, product architect, and former chairman of Tesla, Inc.; owner, executive chairman, and CTO of X Corp.; founder of the Boring Company and xAI; co-founder of Neuralink and OpenAI; and president of the Musk Foundation. He is one of the wealthiest people in the world, with an estimated net worth of US$191 billion as of April 2024, according to the Bloomberg Billionaires Index, and $182.6 billion according to Forbes, primarily from his ownership stakes in Tesla and SpaceX.\\\\n\\\\n\\', \\'source\\': \\'https://en.wikipedia.org/wiki/Wealth_of_Elon_Musk\\'}), Document(page_content=\\'Maye Musk (née Haldeman; born April 19, 1948) is a model and dietitian. She has been a model for 50 years, appearing on the covers of magazines, including a Time magazine health edition, Women\\\\\\'s Day, international editions of Vogue, and Sports Illustrated Swimsuit Issue. She is the mother of Elon Musk, Kimbal Musk and Tosca Musk. She holds Canadian, South African, and American citizenship.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_21', '@search.score': 0.015384615398943424, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'President Vladimir Putin, according to foreign affairs specialist Fiona Hill. In Politico\\\\\\'s interview with Hill, she said that Musk\\\\\\'s suggestion that Kherson and Zaporizhzhia be up for negotiation, and that the water supply for Crimea be secured, was \"so specific that this clearly is a message from Putin\". Musk previously made a similar suggestion at a September event in Aspen, Colorado. Hill told Politico, \"Putin plays the egos of big men, gives them a sense that they can play a role. But in reality, they\\\\\\'re just direct transmitters of messages from Vladimir Putin\".\\\\nIn an email newsletter, Ian Bremmer, head of Eurasia Group, a political-risk consultancy, said that Musk told him that he had spoken directly with Putin, which Musk denied in a reply on Twitter. Musk claimed he had spoken to Putin only once 18 months prior, on a space-related subject matter. Bremmer later took to Twitter to say Musk had told him of the discussion with Putin two weeks earlier. Kremlin spok\\', metadata={\\'title\\': \\'Views of Elon Musk\\', \\'summary\\': \\'Elon Musk is the CEO or owner of multiple companies including Tesla, SpaceX, and X Corp, and has expressed many views on a wide variety of subjects, ranging from politics to science.\\\\nWithin the context of American politics, Musk has said he supported Barack Obama in 2008 and 2012, Hillary Clinton in 2016, and Joe Biden in 2020. In 2022, Musk said he would start voting for Republican Party candidates, with him showing support for Vivek Ramaswamy in the 2024 Republican presidential primaries. He has stated support for universal basic income, gun rights, freedom of speech, a tax on carbon emissions and opposes government subsidies. He is also a critic of illegal immigration and short-selling.\\\\nMusk has expressed concern about issues such as artificial intelligence (AI), climate change and population decline. He has also criticized COVID-19 lockdowns, public transportation, and labor unions.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_12', '@search.score': 0.014925372786819935, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'Musk aims to transform X into an \"everything app\", akin to WeChat.\\\\nHowever, X has faced significant controversy post-rebranding. Issues such as the release of the Twitter Files, suspension of journalists\\\\\\' accounts, and temporary measures like labeling media outlets as \"state-affiliated\" and restricting their visibility have sparked criticism. Despite Musk stepping down as CEO, X continues to grapple with challenges such as viral misinformation, hate speech, and antisemitism controversies. In response to allegations, X Corp. has pursued legal action against nonprofit organizations Media Matters and the Center for Countering Digital Hate.\\\\n\\\\n\\', \\'source\\': \\'https://en.wikipedia.org/wiki/Twitter_under_Elon_Musk\\'}), Document(page_content=\\'Elon Musk is the CEO or owner of multiple companies including Tesla, SpaceX, and X Corp, and has expressed many views on a wide variety of subjects, ranging from politics to science.\\\\nWithin the context of American politics, Musk has said he supported Barack Obama in 2008 and 2012, Hillary Clinton in 2016, and Joe Biden in 2020. In 2022, Musk said he would start voting for Republican Party candidates, with him showing support for Vivek Ramaswamy in the 2024 Republican presidential primaries. He has stated support for universal basic income, gun rights, freedom of speech, a tax on carbon emissions and opposes government subsidies. He is also a critic of illegal immigration and short-selling.\\\\nMusk has expressed concern about issues such as artificial intelligence (AI), climate change and population decline. He has also criticized COVID-19 lockdowns, public transportation, and labor unions. He has promoted conspiracy theories, and made controversial statements that have led to accusations of antisemitism, support of white pride and transphobia.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_9', '@search.score': 0.014705882407724857, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'this idea to Twitter board chair Bret Taylor and CEO Parag Agrawal, proposing to either take the company private or start a rival social media platform. Dorsey responded to Musk with a text message, saying he hoped Twitter could become open-sourced and that he had unsuccessfully pushed for Musk\\\\\\'s induction into Twitter\\\\\\'s board a year earlier, a move that had prompted his departure from his role as CEO.\\\\n\\\\n\\\\n=== Early developments ===\\\\nMusk began purchasing Twitter stock on January 31, 2022. On April 4, he announced that he had acquired 9.2 percent of the company\\\\\\'s shares totaling $2.64 billion, making him the company\\\\\\'s largest shareholder. Following the announcement, Twitter\\\\\\'s stock experienced its large\\', metadata={\\'title\\': \\'Acquisition of Twitter by Elon Musk\\', \\'summary\\': \\'Business magnate Elon Musk initiated an acquisition of American social media company Twitter, Inc. on April 14, 2022, and concluded it on October 28, 2022. Musk stated he intended to buy Twitter to build X, an \"everything app\" he had been developing since 2018 to mimic the Chinese app WeChat. Musk had begun buying shares of the company in January 2022, becoming its largest shareholder by April with a 9.1 percent ownership stake. Twitter invited Musk to join its board of directors, an offer he initially accepted before declining. On April 14, Musk made an unsolicited offer to purchase the company, to which Twitter\\\\\\'s board responded with a \"poison pill\" strategy to resist a hostile takeover before unanimously accepting Musk\\\\\\'s buyout offer of $44 billion on April 25. Musk stated that he planned to introduce new features to the platform, make its algorithms open-source, combat spambot accounts, and promote free speech.\\\\nIn July, Musk announced his intention to terminate the agreement, asserting that Twitter had breached their agreement by refusing to crack down on spambot accounts.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_16', '@search.score': 0.014492753893136978, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'the Twitter service was rebranded as X.\\\\nReactions to the buyout were mixed, with praise for Musk\\\\\\'s planned reforms and vision for the company, particularly his calls for greater free speech, but criticism over fears of a potential rise in misinformation and disinformation, harassment, and hate speech on the platform. Within the United States, conservatives have largely supported the acquisition, while many liberals and former Twitter employees have voiced concerns about Musk\\\\\\'s intentions. Since becoming owner, Musk has faced backlash for his handling of the company and account suspensions, including the December 2022 suspensions of ten journalists.\\\\n\\\\n\\\\n== Prelude ==\\\\n\\\\n\\\\n=== Background ===\\\\n\\\\nBusiness magnate Elon Musk published his first tweet on his personal Twitter account in June 2010, and had more than 80 million followers by April 2022. In 2017, in response to a tweet suggesting that he buy Twitter, Inc., Musk replied, \"How much is it?\" On March 24, 2022, Musk began tweeting criticisms of Twitter, polling his followers on whether the company adhered to the principle that \"free speech is essential to a functioning democracy\". Days later, he discussed the future of social media with Twitter co-founder and former CEO Jack Dorsey and explored the possibility of joining Twitter\\\\\\'s board of directors with private equity firm Silver Lake co-CEO Egon Durban. He relayed this idea to Twitter board chair Bret Taylor and CEO Parag Agrawal, proposing to either take the company private or start a rival social media platform. Dorsey responded to Musk with a text message, saying he hoped Twitter could become open-sourced and that he had unsuccessfully pushed for Musk\\\\\\'s induction into Twitter\\\\\\'s board a year earlier, a move that had prompted his departure from his role as CEO.\\\\n\\\\n\\\\n=== Early developments ===\\\\nMusk began purchasing Twitter stock on January 31, 2022.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_15', '@search.score': 0.014285714365541935, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'latter of which he later apologized for. His ownership of Twitter has been similarly controversial, being marked by layoffs of large numbers of employees, an increase in hate speech, misinformation and disinformation posts on the website, and changes to Twitter Blue verification.\\\\n\\\\n\\\\n== Early life and education ==\\\\n\\\\n\\\\n=== Childhood and family ===\\\\nElon Reeve Musk was born on June 28, 1971, in Pretoria, South Africa\\\\\\'s administrative capital. He is of British and Pennsylvania Dutch ancestry. His mother, Maye Musk (née Haldeman), is a model and dietitian born in Saskatchewan, Canada, and raised in South Africa. His father, Errol Musk, is a South African electromechanical engineer, pilot, sailor, consultant, emerald dealer, and property developer, who partly owned a rental lodge at the Timbavati Private Nature Reserve. Elon has a younger brother, Kimbal, and a younger sister, Tosca. Elon has four paternal half-siblings.\\\\nThe family was wealthy during Elon\\\\\\'s youth. Despite both Musk and Errol previously stating that Errol was a part owner of a Zambian emerald mine, in 2023, Errol recounted that the deal he made was to receive \"a portion of the emeralds produced at three small mines.\" Errol was elected to the Pretoria City Council as a representative of\\', metadata={\\'title\\': \\'Elon Musk\\', \\'summary\\': \\'Elon Reeve Musk (; born June 28, 1971) is a businessman and investor known for his key roles in space company SpaceX and automotive company Tesla, Inc. Other involvements include ownership of X Corp., formerly Twitter, and his role in the founding of The Boring Company, xAI, Neuralink and OpenAI. He is one of the wealthiest people in the world; as of June 2024, Forbes estimates his net worth to be US$214 billion.\\\\nMusk was born in Pretoria to Maye and Errol Musk and briefly attended the University of Pretoria before immigrating to Canada at age 18, acquiring citizenship through his Canadian-born mother.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_2', '@search.score': 0.014084506779909134, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'The rebranding ha\\', metadata={\\'title\\': \\'Twitter under Elon Musk\\', \\'summary\\': \\'Elon Musk completed his acquisition of Twitter in October 2022; Musk acted as CEO of Twitter until June 2023 when he was succeeded by Linda Yaccarino. Under Musk, Twitter was rebranded to X. It is one of the top social media platforms and the seventh-most visited website in the world. Users can share posts containing text messages, images, and videos and interact with other users\\\\\\' content through likes and reposts. X offers additional features such as direct messaging, video and audio calling, bookmarks, lists, communities, a chatbot, and the social audio feature Spaces.\\\\nFounded in March 2006 by Jack Dorsey, Noah Glass, Biz Stone, and Evan Williams as Twitter, it underwent a rebranding in July 2023 after being acquired by Elon Musk in 2022. \\\\nNow operating as X, the platform closely resembles its predecessor but includes additional features such as long-form texts, account monetization options, audio-video calls, integration with xAI\\\\\\'s Grok chatbot, job search, and a verification process accessible to premium users. Several Twitter features have been removed from the site, including Circles, NFT profile pictures, and pronouns in profiles. Musk aims to transform X into an \"everything app\", akin to WeChat.\\\\nHowever, X has faced significant controversy post-rebranding. Issues such as the release of the Twitter Files, suspension of journalists\\\\\\' accounts, and temporary measures like labeling media outlets as \"state-affiliated\" and restricting their visibility have sparked criticism. Despite Musk stepping down as CEO, X continues to grapple with challenges such as viral misinformation, hate speech, and antisemitism controversies.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_8', '@search.score': 0.013888888992369175, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'and SpaceX.\\\\n\\\\n\\', \\'source\\': \\'https://en.wikipedia.org/wiki/Wealth_of_Elon_Musk\\'}), Document(page_content=\\'Maye Musk (née Haldeman; born April 19, 1948) is a model and dietitian. She has been a model for 50 years, appearing on the covers of magazines, including a Time magazine health edition, Women\\\\\\'s Day, international editions of Vogue, and Sports Illustrated Swimsuit Issue. She is the mother of Elon Musk, Kimbal Musk and Tosca Musk. She holds Canadian, South African, and American citizenship. She is a registered dietitian.\\\\n\\\\n\\\\n== Early life and career ==\\\\nMaye Haldeman was born on April 19, 1948, in Regina, Saskatchewan, Canada, a twin and one of five children. Her family moved to Pretoria, South Africa, in 1950. Her parents, Winnifred Josephine \"Wyn\" (Fletcher) and Dr. Joshua Norman Haldeman, a former director of Technocracy Incorporated, a former Regina chiropractor and amateur archaeologist, were adventurous and flew the family around the world in a prop plane in 1952. For over ten years, the family spent time roaming the Kalahari desert in search of its fabled Lost City of the Kalahari. Their parents gave slide shows and talks about their journeys. \"My parents were very famous, but they were never snobs,\" she said. Joshua Haldeman was a political activist who ran for the Canadian Parliament on the Social Credit Party ticket, and headed the Canadian branch of the Technocracy movement. In 1956 Dr. Haldeman participated on the 3rd edition of the trans-Africa Algiers-Cape Town Rally with a Ford Ranch-Wagon 5.4L and finished tied for 1st place.\\\\nAs her parents were entrepreneurs, Musk started working at about 8 years of age, where she would \"prepare her parents monthly bulletins and photocopy newsletters, and then put the stamps on the envelopes.” By the age of 12, before and then after school, Musk worked as a receptionist alongside her twin sister for their father. \\\\nAs a young woman, Haldeman was a finalist in the 1969 Miss South Africa beauty competition.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_22', '@search.score': 0.013698630034923553, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'with him showing support for Vivek Ramaswamy in the 2024 Republican presidential primaries. He has stated support for universal basic income, gun rights, freedom of speech, a tax on carbon emissions and opposes government subsidies. He is also a critic of illegal immigration and short-selling.\\\\nMusk has expressed concern about issues such as artificial intelligence (AI), climate change and population decline. He has also criticized COVID-19 lockdowns, public transportation, and labor unions. He has promoted conspiracy theories, and made controversial statements that have led to accusations of antisemitism, support of white pride and transphobia. His views on international relations, including on the China-Taiwan and Russia-Ukraine conflicts, have received mixed reactions.\\', \\'source\\': \\'https://en.wikipedia.org/wiki/Views_of_Elon_Musk\\'}), Document(page_content=\\'Business magnate Elon Musk initiated an acquisition of American social media company Twitter, Inc. on April 14, 2022, and concluded it on October 28, 2022. Musk stated he intended to buy Twitter to build X, an \"everything app\" he had been developing since 2018 to mimic the Chinese app WeChat. Musk had begun buying shares of the company in January 2022, becoming its largest shareholder by April with a 9.1 percent ownership stake. Twitter invited Musk to join its board of directors, an offer he initially accepted before declining. On April 14, Musk made an unsolicited offer to purchase the company, to which Twitter\\\\\\'s board responded with a \"poison pill\" strategy to resist a hostile takeover before unanimously accepting Musk\\\\\\'s buyout offer of $44 billion on April 25. Musk stated that he planned to introduce new features to the platform, make its algorithms open-source, combat spambot accounts, and promote free speech.\\\\nIn July, Musk announced his intention to terminate the agreement, asserting that Twitter had breached their agreement by refusing to crack down on spambot accounts.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_13', '@search.score': 0.013513513840734959, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'billion according to Forbes, primarily from his ownership stakes in Tesla and SpaceX.\\\\n\\\\n\\\\n== Details ==\\\\nAt the start of 2020, Elon Musk had a net worth of $27 billion. By the end of the year his net worth had increased by $150 billion, mostly driven by his ownership of around 20% of Tesla stock. During this period, Musk\\\\\\'s net worth was often volatile. For example, it dropped $16.3 billion on September 8, the largest single-day plunge in Bloomberg Billionaires Index\\\\\\'s history at the time. In November of that year, Musk passed Facebook co-founder Mark Zuckerberg to become the third-richest person in the world; a week later he passed Microsoft co-founder Bill Gates to become the second-richest.\\\\nIn January 2021, Musk, with a net worth of $185 billion, surpassed Amazon founder Jeff Bezos to become the richest person in the world. Bezos reclaimed the top spot the following month. On September 27, 2021, after Tesla stock surged, Forbes announced that Musk had a net worth of over $200 billion, and was the richest person in the world. In November 2021, Musk became the first person to have a net worth of more than $300 billion.\\\\nOn December 30, 2022, it was reported that Musk had lost $200 billion from his net worth due to declining stock values in Tesla, becoming the first person in history to lose such a large sum of money. In January 2023, Musk was recognized by Guinness World Records for experiencing the \"largest loss of personal fortune in history\" with regards to his financial losses since November 2021, which Guinness quoted a Forbes estimate of $182 billion.\\\\nMusk\\\\\\'s personal wealth is managed by his family office called Excession LLC, formed in 2016 and run by Jared Birchall.\\\\n\\\\n\\\\n=== Sources of wealth ===\\\\nAround 75% of Musk\\\\\\'s wealth was derived from Tesla stock in November 2020, a proportion that fell to about 37% as of December 2022, after selling nearly $40 billion in company shares since late 2021. Musk does not receive a salary from Tesla;', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_19', '@search.score': 0.013333333656191826, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'an increase in hate speech, misinformation and disinformation posts on the website, and changes to Twitter Blue verification.\\', \\'source\\': \\'https://en.wikipedia.org/wiki/Elon_Musk\\'}), Document(page_content=\\'Elon Musk completed his acquisition of Twitter in October 2022; Musk acted as CEO of Twitter until June 2023 when he was succeeded by Linda Yaccarino. Under Musk, Twitter was rebranded to X. It is one of the top social media platforms and the seventh-most visited website in the world. Users can share posts containing text messages, images, and videos and interact with other users\\\\\\' content through likes and reposts. X offers additional features such as direct messaging, video and audio calling, bookmarks, lists, communities, a chatbot, and the social audio feature Spaces.\\\\nFounded in March 2006 by Jack Dorsey, Noah Glass, Biz Stone, and Evan Williams as Twitter, it underwent a rebranding in July 2023 after being acquired by Elon Musk in 2022. \\\\nNow operating as X, the platform closely resembles its predecessor but includes additional features such as long-form texts, account monetization options, audio-video calls, integration with xAI\\\\\\'s Grok chatbot, job search, and a verification process accessible to premium users. Several Twitter features have been removed from the site, including Circles, NFT profile pictures, and pronouns in profiles. Musk aims to transform X into an \"everything app\", akin to WeChat.\\\\nHowever, X has faced significant controversy post-rebranding. Issues such as the release of the Twitter Files, suspension of journalists\\\\\\' accounts, and temporary measures like labeling media outlets as \"state-affiliated\" and restricting their visibility have sparked criticism. Despite Musk stepping down as CEO, X continues to grapple with challenges such as viral misinformation, hate speech, and antisemitism controversies.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_5', '@search.score': 0.01315789483487606, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'new owner and CEO, took Twitter private, merged it into X Corp., and fired several top executives, including CEO Parag Agrawal. Following Twitter\\\\\\'s change in ownership, Musk renamed several features to remove references to bird-oriented terminology, including Birdwatch to Community Notes.\\\\n\\\\n\\\\n=== Post-acquisition ===\\\\nOn July 23, 2023, Musk announced X\\\\\\'s launch, which would replace Twitter, which started when the X.com domain (formerly associated with PayPal) began redirecting to Twitter; the logo was changed from the bird to the X the next day, and the platform\\\\\\'s official main and associated accounts also began using the letter X within their handles. The @x handle was originally owned by photographer Gene X Hwang, who registered it in 2007. Hwang had expressed willingness to sell the handle, but received an email on July 25, 2023, stating that the company was taking it. He was offered some X merchandise and a meeting with the company\\\\\\'s leaders, but no financial benefits. The Android app\\\\\\'s name and icon were changed to X on Google Play by July 27; the same change went live on the App Store on July 31 after Apple granted an exception to its minimum character length of 2. Around that time, some more elements of the Twitter branding were removed from the web version, including tweets being renamed to \"posts\".\\\\nThe rebrand was described as unusual, given that Twitter\\\\\\'s brand was already strong internationally, with words like \"tweet\" having entered common language. The rebranding ha\\', metadata={\\'title\\': \\'Twitter under Elon Musk\\', \\'summary\\': \\'Elon Musk completed his acquisition of Twitter in October 2022; Musk acted as CEO of Twitter until June 2023 when he was succeeded by Linda Yaccarino. Under Musk, Twitter was rebranded to X. It is one of the top social media platforms and the seventh-most visited website in the world. Users can share posts containing text messages, images, and videos and interact with other users\\\\\\' content through likes and reposts.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_7', '@search.score': 0.012987012974917889, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'its markets for Tesla. After Gigafactory Shanghai produced its first batch of vehicles, Musk thanked the Chinese government and Chinese people while criticizing the United States and its people.:\\\\u200a207–208\\\\u200a On the 100th anniversary of the founding of the Chinese Communist Party, Musk praised the state\\\\\\'s \"economic prosperity\". In 2022, Musk wrote an article for China Cyberspace, the official publication of Cyberspace Administration of China, which enforces Internet censorship in China. His writing the article was described as conflicting with his advocacy for free speech.\\\\n\\\\n\\\\n=== Russian invasion of Ukraine ===\\\\n\\\\nFollowing the Russian invasion of Ukraine, Musk floated a controversial proposal on Twitter in October 2022, arguing that Ukraine should permanently cede occupied territories (e.g. Crimea) to Russia, and that Ukraine should drop its bid to join NATO. The four-part proposal, posted as a Twitter poll, suggested new referendums under United Nations supervision on the annexation of Russia-occupied territories. The proposal was welcomed by the Russian government and denounced by Ukrainian President Volodymyr Zelenskyy as \"pro-Russia\", with officials noting that people who had been murdered or forcibly deported by Russia would be unable to vote.\\\\nMusk appeared to be \"transmitting a message\" for Russian President Vladimir Putin, according to foreign affairs specialist Fiona Hill. In Politico\\\\\\'s interview with Hill, she said that Musk\\\\\\'s suggestion that Kherson and Zaporizhzhia be up for negotiation, and that the water supply for Crimea be secured, was \"so specific that this clearly is a message from Putin\". Musk previously made a similar suggestion at a September event in Aspen, Colorado. Hill told Politico, \"Putin plays the egos of big men, gives them a sense that they can play a role.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_11', '@search.score': 0.012820512987673283, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'to which Twitter\\\\\\'s board responded with a \"poison pill\" strategy to resist a hostile takeover before unanimously accepting Musk\\\\\\'s buyout offer of $44 billion on April 25. Musk stated that he planned to introduce new features to the platform, make its algorithms open-source, combat spambot accounts, and promote free speech.\\\\nIn July, Musk announced his intention to terminate the agreement, asserting that Twitter had breached their agreement by refusing to crack down on spambot accounts. The company filed a lawsuit against Musk in the Delaware Court of Chancery shortly thereafter, with a trial scheduled for the week of October 17. Weeks before the trial was set to begin, Musk reversed course, announcing that he would move forward with the acquisition. The deal was closed on October 28, with Musk immediately becoming Twitter\\\\\\'s new owner and CEO. Twitter was taken private and merged into a new parent company named X Corp. Musk promptly fired several top executives, including previous CEO Parag Agrawal. Musk has since proposed several reforms to Twitter and laid off half of the company\\\\\\'s workforce. Hundreds of employees then resigned from the company after Musk issued an ultimatum demanding they commit to \"extremely hardcore\" work. Linda Yaccarino was appointed CEO of X Corp. In July 2023, the Twitter service was rebranded as X.\\\\nReactions to the buyout were mixed, with praise for Musk\\\\\\'s planned reforms and vision for the company, particularly his calls for greater free speech, but criticism over fears of a potential rise in misinformation and disinformation, harassment, and hate speech on the platform. Within the United States, conservatives have largely supported the acquisition, while many liberals and former Twitter employees have voiced concerns about Musk\\\\\\'s intentions.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_14', '@search.score': 0.012658228166401386, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'to which Twitter\\\\\\'s board responded with a \"poison pill\" strategy to resist a hostile takeover before unanimously accepting Musk\\\\\\'s buyout offer of $44 billion on April 25. Musk stated that he planned to introduce new features to the platform, make its algorithms open-source, combat spambot accounts, and promote free speech.\\\\nIn July, Musk announced his intention to terminate the agreement, asserting that Twitter had breached their agreement by refusing to crack down on spambot accounts. The company filed a lawsuit against Musk in the Delaware Court of Chancery shortly thereafter, with a trial scheduled for the week of October 17. Weeks before the trial was set to begin, Musk reversed course, announcing that he would move forward with the acquisition. The deal was closed on October 28, with Musk immediately becoming Twitter\\\\\\'s new owner and CEO. Twitter was taken private and merged into a new parent company named X Corp. Musk promptly fired several top executives, including previous CEO Parag Agrawal. Musk has since proposed several reforms to Twitter and laid off half of the company\\\\\\'s workforce. Hundreds of employees then resigned from the company after Musk issued an ultimatum demanding they commit to \"extremely hardcore\" work. Linda Yaccarino was appointed CEO of X Corp. In July 2023, the Twitter service was rebranded as X.\\\\nReactions to the buyout were mixed, with praise for Musk\\\\\\'s planned reforms and vision for the company, particularly his calls for greater free speech, but criticism over fears of a potential rise in misinformation and disinformation, harassment, and hate speech on the platform. Within the United States, conservatives have largely supported the acquisition, while many liberals and former Twitter employees have voiced concerns about Musk\\\\\\'s intentions.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_17', '@search.score': 0.012500000186264515, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'Musk aims to transform X into an \"everything app\", akin to WeChat.\\\\nHowever, X has faced significant controversy post-rebranding. Issues such as the release of the Twitter Files, suspension of journalists\\\\\\' accounts, and temporary measures like labeling media outlets as \"state-affiliated\" and restricting their visibility have sparked criticism. Despite Musk stepping down as CEO, X continues to grapple with challenges such as viral misinformation, hate speech, and antisemitism controversies. In response to allegations, X Corp. has pursued legal action against nonprofit organizations Media Matters and the Center for Countering Digital Hate.\\\\n\\\\n\\\\n== History ==\\\\n\\\\n\\\\n=== Acquisition of Twitter ===\\\\n\\\\nElon Musk initiated the acquisition of Twitter, Inc. on April 14, 2022, and completed it on October 28, 2022. His goal was to transform Twitter into X, an all-encompassing app inspired by WeChat. By April, Musk had become Twitter\\\\\\'s largest shareholder with a 9.2 percent stake and made an unsolicited $44 billion offer on April 14, which Twitter\\\\\\'s board initially resisted before accepting on April 25. In July, Musk attempted to terminate the deal, citing Twitter\\\\\\'s failure to address spam bot accounts. Twitter sued him, with a trial set for mid-October. Musk then reversed his decision and completed the acquisition on October 28. He became the new owner and CEO, took Twitter private, merged it into X Corp., and fired several top executives, including CEO Parag Agrawal. Following Twitter\\\\\\'s change in ownership, Musk renamed several features to remove references to bird-oriented terminology, including Birdwatch to Community Notes.\\\\n\\\\n\\\\n=== Post-acquisition ===\\\\nOn July 23, 2023, Musk announced X\\\\\\'s launch, which would replace Twitter, which started when the X.com domain (formerly associated with PayPal) began redirecting to Twitter;', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_6', '@search.score': 0.012345679104328156, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'to his financial losses since November 2021, which Guinness quoted a Forbes estimate of $182 billion.\\\\nMusk\\\\\\'s personal wealth is managed by his family office called Excession LLC, formed in 2016 and run by Jared Birchall.\\\\n\\\\n\\\\n=== Sources of wealth ===\\\\nAround 75% of Musk\\\\\\'s wealth was derived from Tesla stock in November 2020, a proportion that fell to about 37% as of December 2022, after selling nearly $40 billion in company shares since late 2021. Musk does not receive a salary from Tesla; he agreed with the board in 2018 to a compensation plan that ties his personal earnings to Tesla\\\\\\'s valuation and revenue. The deal stipulated that Musk only received the compensation if Tesla reached certain market values. It was the largest such deal ever done between a CEO and a company board. In the first award, given in May 2020, he was eligible to purchase 1.69 million Tesla shares (about 1% of the company) at below-market prices, which was worth about $800 million.\\\\nThe above stock compensation deal was invalidated by the Delaware court due to Musk controlling Tesla and having massive influence on the directors, making the compensation decision a \"conflicted-controller transaction\" which is subject to court review in Delaware law to be judged for fairness. Tesla is trying to reinstate the payment package via new shareholders votes.\\\\nMusk paid $455 million in taxes on $1.52 billion of income between 2014 and 2018. According to ProPublica, Musk paid no federal income taxes in 2018. He stated his 2021 tax bill was estimated at $12 billion based on his sale of $14 billion worth of Tesla stock.\\\\nMusk has repeatedly described himself as \"cash poor\", and has \"professed to have little interest in the material trappings of wealth\". In May 2020, he pledged to sell almost all physical possessions.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_20', '@search.score': 0.012195121496915817, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n", - "{'chunk': 'freedom of speech, a tax on carbon emissions and opposes government subsidies. He is also a critic of illegal immigration and short-selling.\\\\nMusk has expressed concern about issues such as artificial intelligence (AI), climate change and population decline. He has also criticized COVID-19 lockdowns, public transportation, and labor unions. He has promoted conspiracy theories, and made controversial statements that have led to accusations of antisemitism, support of white pride and transphobia. His views on international relations, including on the China-Taiwan and Russia-Ukraine conflicts, have received mixed reactions.\\\\n\\\\n\\\\n== International relations ==\\\\n\\\\n\\\\n=== Bolivia ===\\\\nIn July 2020, Musk tweeted, \"We will coup whoever we want! Deal with it\" in response to a Twitter user who implied that the US government organized a coup (referring to the 2019 Bolivian political crisis) against Evo Morales for Musk to obtain lithium from Bolivia. Musk\\\\\\'s tweet caused controversy and was later deleted.\\\\n\\\\n\\\\n=== China ===\\\\nMusk has praised China and has been described as having a close relationship with the Chinese government, allowing access to its markets for Tesla. After Gigafactory Shanghai produced its first batch of vehicles, Musk thanked the Chinese government and Chinese people while criticizing the United States and its people.:\\\\u200a207–208\\\\u200a On the 100th anniversary of the founding of the Chinese Communist Party, Musk praised the state\\\\\\'s \"economic prosperity\". In 2022, Musk wrote an article for China Cyberspace, the official publication of Cyberspace Administration of China, which enforces Internet censorship in China.', 'chunk_id': 'c6928b809a48_aHR0cHM6Ly9zZWFyY2h5YW4uYmxvYi5jb3JlLndpbmRvd3MubmV0L2Vsb24vZWwudHh00_pages_10', '@search.score': 0.012048192322254181, '@search.reranker_score': None, '@search.highlights': None, '@search.captions': None}\n" - ] - } - ], - "source": [ - "search_client = SearchClient(service_endpoint, index_name, AzureKeyCredential(key))\n", - "vector_query = VectorizedQuery(vector=get_embeddings(query), k_nearest_neighbors=3, fields=\"text_vector\")\n", - "\n", - "results = search_client.search(\n", - " search_text=query,\n", - " vector_queries=[vector_query],\n", - " select=[\"chunk_id\",\"chunk\"],\n", - ")\n", - "\n", - "for result in results:\n", - " print(result)\n", - "# [END simple_hybrid_search]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## LLM Answer (No data sources)" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The information about subsidiaries for companies founded by Elon Musk was not provided above.\n" - ] - } - ], - "source": [ - "from langchain_core.messages import HumanMessage, SystemMessage\n", - "chat = llm\n", - "\n", - "# Vector Search Answer\n", - "messages = [\n", - " SystemMessage(\n", - " content=f\"You are a helpful assistant who generates information to questions. Please answer the question\"\n", - " ),\n", - " HumanMessage(\n", - " content= f\"{query}\"\n", - " ),\n", - " HumanMessage(\n", - " content= f\"write a short answer based on the information above, provide a short answer, not nore than 1 line that must answer the question.\"\n", - " )\n", - " \n", - "]\n", - "LLM_ans_colleague = chat.invoke(messages)\n", - "print(LLM_ans_colleague.content)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## LLM + RAG answer" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Elon Musk has founded or co-founded several companies, including SpaceX, Tesla, Inc., Neuralink, The Boring Company, OpenAI, and xAI, with subsidiaries such as Tesla Energy (formerly SolarCity).\n" - ] - } - ], - "source": [ - "chat = llm\n", - "\n", - "# Vector Search Answer\n", - "messages = [\n", - " SystemMessage(\n", - " content=f\"You are a helpful assistant who generates information grounded with facts. Please enhance Vector search answer and generate the final answer. the question was: {query}\"\n", - " ),\n", - " HumanMessage(\n", - " content= f\"Search Results: {result_array}\"\n", - " ),\n", - " HumanMessage(\n", - " content= f\"write a short answer based on the information above, provide a short answer, not nore than 1 line that must answer the question.\"\n", - " )\n", - " \n", - "]\n", - "vector_ans_colleague = chat.invoke(messages)\n", - "print(vector_ans_colleague.content)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# GraphRag" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "SpaceX, founded by Elon Musk, has a subsidiary named TBC - The Boring Company.\n" - ] - } - ], - "source": [ - "chat = llm\n", - "\n", - "# Full Answer Graph and Vector Search\n", - "messages = [\n", - " SystemMessage(\n", - " content=f\"You are a helpful assistant who generates information grounded with facts. Please enhance the original answer with complementary entity and relationship information from the knowledge graph to generate the final answer. the question was: {query}\"\n", - " ),\n", - " HumanMessage(\n", - " content= f\"Graph Results: {kg_context}\"\n", - " ),\n", - " HumanMessage(\n", - " content= f\"Search Results: {result_array}\"\n", - " ),\n", - " HumanMessage(\n", - " content= f\"write a short answer based on the information above, provide a short answer, not nore than 1 line that must answer the question.\"\n", - " )\n", - " \n", - "]\n", - "final_ans_colleague = chat.invoke(messages)\n", - "print(final_ans_colleague.content)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": ".venv", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -}