{"id":6935,"date":"2024-02-26T18:39:42","date_gmt":"2024-02-26T22:39:42","guid":{"rendered":"https:\/\/www.benzinga.com\/apis\/?p=6935"},"modified":"2024-02-26T18:39:49","modified_gmt":"2024-02-26T22:39:49","slug":"utilizing-the-benzinga-news-archive-to-power-your-llm","status":"publish","type":"post","link":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/","title":{"rendered":"Utilizing the Benzinga News Archive to Power your LLM"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Last week <a href=\"https:\/\/www.benzinga.com\/news\/24\/02\/37254800\/reddit-and-google-team-up-in-60-million-deal-to-train-search-giants-ai-models-report\">Google announced that they would be teaming up with Reddit<\/a> to acquire their historical archive to train their AI models. Human written archives are becoming more and more valuable as AI models and their use cases become more prevalent. In the financial services industry language models can be incredibly useful for algo trading, as well as simply facilitating informed decision-making.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now imagine having a tool that not only finds insights into stocks and articles but also breaks down how News impacts the market and its sentiments in a straightforward manner. This is not just an idea; it&#8217;s a reality made possible by the vast and valuable data archive that the Benzinga Newsdesk has contributed to over the last 14 years. The Benzinga News S3 bucket houses an extraordinary source of comprehensive data with the potential to power any Large Language Model (LLM), especially one related to finance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ll guide you through each step, revealing the process of creating your own intelligent assistant. This assistant will excel in reading, summarizing, gaining insights, and analyzing sentiments. Our journey begins by tapping into the data stored in Benzinga&#8217;s S3 bucket. We&#8217;ll explore how to preprocess this data, a crucial step in extracting meaningful insights. Subsequently, armed with refined information, we&#8217;ll delve into the articles, unveiling essential market insights.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What are S3 buckets and AWS?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">AWS, or <a href=\"https:\/\/aws.amazon.com\/\">Amazon Web Services<\/a>, is like a gigantic toolbox of cloud computing services provided by Amazon. It offers a variety of tools and resources that individuals and businesses can use to run applications, store data, and perform various tasks without needing to set up their own physical servers. Essentially, AWS provides a convenient and flexible way to access computing power and services over the Internet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">S3 buckets are like containers where you can store and organize your files, such as photos, videos, or documents. Think of them as virtual buckets where you can keep your data safe, and easily access or share it over the internet whenever you need. It&#8217;s a simple and efficient way to manage your digital stuff in the cloud.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Obtaining the Benzinga stock news dataset using AWS S3 buckets&nbsp;<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this section, we will access the data from the Benzinga&#8217;s AWS news database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. We need to install and configure the AWS command line interface first. You can find the download link and instructions <a href=\"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/getting-started-install.html#getting-started-install-instructions\">here<\/a>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. After installation, you can access AWS from your command line or terminal. Check it through the command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\naws \u2013 version\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">3. Now, we will configure the command line to access Benzinga containers. Here, you will be asked the username, password, region name, and output format. Use the following command and enter the necessary details for your S3 bucket:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\naws configure\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">4. Once this is done we can access the specific bucket from the AWS account using the command to list all the files or folders there.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\naws s3 ls bucket_url\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Replace your bucket url from this. Once you cd your self to the directory which you want to download.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">5. Use this command to save it to your desired folder<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\naws  s3 cp bucket_url path_to_save_folder_ \u2013recursive\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The data will be downloaded to the specified folder in the format json.gz<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Converting and Preprocessing Data<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now armed with our treasure of data, we move on to the crucial step of converting it into a more understandable format \u2013 CSV. A Python script is introduced, demonstrating how to extract and convert JSON data into a CSV file. This step ensures that our model comprehends the data effectively, setting the stage for insightful analysis.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We will now convert the data to CSV format so that the model understands it. Along with that, we will also preprocess the data:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; gutter: false; title: ; notranslate\" title=\"\">\nimport json\nimport gzip\nimport csv\nimport os\n\n# Function to extract and convert JSON data to CSV\ndef json_to_csv(input_folder, output_csv):\n    with open(output_csv, &#039;w&#039;, newline=&#039;&#039;, encoding=&#039;utf-8&#039;) as csv_file:\n        csv_writer = csv.writer(csv_file)\n        # Write the header\n        csv_writer.writerow(&#x5B;&quot;id&quot;, &quot;author&quot;, &quot;created&quot;, &quot;updated&quot;, &quot;title&quot;, &quot;teaser&quot;, &quot;body&quot;, &quot;url&quot;])\n         \n        # Loop through each JSON file in the folder\n        for filename in os.listdir(input_folder):\n            if filename.endswith(&quot;.json.gz&quot;):\n                file_path = os.path.join(input_folder, filename)\n                with gzip.open(file_path, &#039;rt&#039;, encoding=&#039;utf-8&#039;) as json_file:\n                    data = json.load(json_file)\n                    print(data)\n                    # Extract relevant fields and write to CSV\n                    csv_writer.writerow(&#x5B;\n                        data.get(&quot;id&quot;, &quot;&quot;),\n                        data.get(&quot;author&quot;, &quot;&quot;),\n                        data.get(&quot;created&quot;, &quot;&quot;),\n                        data.get(&quot;updated&quot;, &quot;&quot;),\n                        data.get(&quot;title&quot;, &quot;&quot;),\n                        data.get(&quot;teaser&quot;, &quot;&quot;),\n                        data.get(&quot;body&quot;, &quot;&quot;),\n                        data.get(&quot;url&quot;, &quot;&quot;)\n                    ])\n \n \n# Specify the input folder containing JSON files and the output CSV file\ninput_folder = &quot;D:\\\\Scriptonomy Python Developer\\\\ph\\\\01\\\\01&quot;\noutput_csv = &quot;202301---1.csv&quot;\n \n \n# Call the function to convert JSON to CSV\njson_to_csv(input_folder, output_csv)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The provided Python script defines a function, json_to_csv, aimed at converting a collection of gzipped JSON files in a specified input folder into a CSV format. The function iterates through each file, extracts relevant fields such as &#8220;<strong>id<\/strong>,&#8221; &#8220;<strong>author<\/strong>,&#8221; &#8220;<strong>created<\/strong>,&#8221; and others, and then writes this information as rows into a CSV file.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The script utilizes standard Python libraries such as JSON, GZIP, CSV, and OS for handling JSON data, decompressing files, managing CSV operations, and interacting with the file system. After defining the function, the script specifies the input folder path containing the JSON files and designates an output CSV file. Finally, the script invokes the json_to_csv function, initiating the conversion process and producing a CSV file with the extracted information from the JSON files.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Making your own article assistant<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, we explore the realm of creating your own article assistant powered by OpenAI&#8217;s language model (GPT-3.5-turbo). This assistant aids in sentiment analysis and provides insights into how the information in an article influences market conditions and prices.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Importing the necessary packages that will help in managing the resources, all these if not present in the environment can be installed with&nbsp;<em>!pip install package_name<\/em>.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; gutter: false; title: ; notranslate\" title=\"\">\nimport openai\nimport pandas as pd\nfrom bs4 import BeautifulSoup\n# openai.api_key = &quot;YOUR_API_KEY&quot;\n\n<\/pre><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>OpenAI acts as a vast source of LLMs and its applications<\/li>\n\n\n\n<li>Pandas is used for handling the data, it comes with lots of inbuilt functions to help ease many important processes.<\/li>\n\n\n\n<li>BeautifulSoup is used for extracting data from various sources.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\n# openai.api_key = &quot;YOUR_API_KEY&quot;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The following function connects with <em><strong>gpt-3.5-turbo<\/strong><\/em> and configures the model with prompt and response. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; gutter: false; title: ; notranslate\" title=\"\">\ndef get_chatcompletion(prompt, model=&quot;gpt-3.5-turbo&quot;):\n    messages = &#x5B;{&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: prompt}]\n    response = openai.ChatCompletion.create(\n        model=model,\n        messages=messages,\n        temperature=0, # this is the degree of randomness of the model&#039;s output\n    )\n    return response.choices&#x5B;0].message&#x5B;&quot;content&quot;]\n \n \ndf = pd.read_csv(&#039;the_path_to_savedCSV&#039;)\n \n \ndf\n<\/pre><\/div>\n\n\n<p class=\"has-text-align-center has-medium-font-size wp-block-paragraph\"><em><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/0ZK6Gz3M7gmBT3nA8DQyA_Y1EIzJMievzTdHY6crUEnKyNWZa_TyJtQYI5ZmnaO3vkwTdiSnTzogXgalB_-t4ny1LFnW-wmXLoH3WMdifE86KI8RJ3CvGu0chGhjvkk2NIDhqe2DWdfweIyxm4gw23E\" style=\"width: 5000px;\"><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The dataset contains information about various articles, each represented by a row. The columns include &#8216;id&#8217; (article identifier), &#8216;author&#8217; (author&#8217;s name), &#8216;created&#8217; (creation timestamp), &#8216;updated&#8217; (last update timestamp), &#8216;title&#8217; (article title), &#8216;teaser&#8217; (a brief summary of the article), &#8216;body&#8217; (the main content of the article), and &#8216;url&#8217; (the URL where the full article can be accessed).&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The data covers articles on diverse topics, such as Elon Musk&#8217;s thoughts on a housing bubble, the mileage achievement of a 2014 Tesla, discussions on long-lasting batteries, Bill Gates&#8217; perspective on climate change, a photo gallery on plant magic, and a list of video games for a night in. The dataset seems to capture a range of articles from different authors and topics within the specified timeframe.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following functions clean the body of the article of the HTML and other impurities so that the model gives the best output.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; gutter: false; title: ; notranslate\" title=\"\">\ndef cleaner(text):\n    soup = BeautifulSoup(text, &#039;html.parser&#039;)\n    # Extract text without HTML tags\n    text_without_html = soup.get_text()\n    return text_without_html\n\n\ndf&#x5B;&#039;body&#039;] = df&#x5B;&#039;body&#039;].apply(cleaner)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Now we give instructions to the model to give sentiments, insights related to the market, and the explanation behind the output it is giving. Following the chain of thoughts prompting, explained in the paper, <a href=\"https:\/\/arxiv.org\/abs\/2201.11903\">Chain-of-Thought Prompting Elicits Reasoning in Large Language Models<\/a>. As explained in the paper asking for justifications improve models performance. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Chain of Thought Prompting<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In chain-of-thought prompting, the input question is followed by a series of intermediate natural language reasoning steps that lead to the final answer. Think of this as breaking down a complicated task into bite-sized, logical chunks.&nbsp;<\/p>\n\n\n\n<p class=\"has-text-align-center has-medium-font-size wp-block-paragraph\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/sGEDTuSrCOmE2vArH9h7CiJbHMK3hNP4GW6NUlsCL3RtxZ3vvXTRVUVZR6whNHaZNSf7ozxX2BJnhd--G9VEQrpvj7gjsfaT1UQdisjrHtm3uPZV_kR4mvUfEOamBNaEj1Gxd4vqylBHGdYkL8Fs9MU\" style=\"width: 5000px;\"><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; gutter: false; title: ; notranslate\" title=\"\">\nprompt = f&quot;&quot;&quot;\n        You are a sentiment analyser and your task is to predict the sentiment on a stock news article on a scale of 1 to 10, \n        1 being most negative, 10 being most positive and 5 being neutral. Give the explanation for your ratings and also give insights \n        how the information given in the article will affect the market conditions and prices, point wise and relate it with current market\n        conditions.\n        \n        Article: {df&#x5B;&#039;body&#039;]&#x5B;0]}\n\n\n&quot;&quot;&quot;\n\n\nresponse = get_chatcompletion(prompt)\nprint(response)\n<\/pre><\/div>\n\n\n<p class=\"has-text-align-center has-medium-font-size wp-block-paragraph\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/TLe24s1flMKPsaZ-jARF7G7BSaEJjF4C72RsNnIe9H9S6ZY096CxvJckc2d2zr4vCcDcEvUQktkgH4FrjY6mtBeNkfj3eeuifWD_Ng9VwKnHZ2URBlJ6G328imoLhRePsgJ0RTbKQ-MhA_bUrxgR08I\" style=\"width: 5000px;\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The response includes all the important details that one needs to understand the article and make important decisions based on stock news. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In summary, this article introduces a powerful solution for staying informed about financial markets by combining Benzinga&#8217;s robust News content and Artificial Intelligence.\u00a0It guides readers through accessing Benzinga&#8217;s stock news dataset using AWS S3 buckets, converting and preprocessing the data with a Python script, and creating a personalized article assistant using OpenAI&#8217;s GPT-3.5-turbo.\u00a0The approach enables sentiment analysis, insightful market predictions, and decision-making based on a diverse set of articles. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Benzinga News S3 bucket houses an extraordinary source of comprehensive data with the potential to power any Large Language Model (LLM).<\/p>\n","protected":false},"author":77,"featured_media":6939,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[135,138,134,137],"class_list":["post-6935","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-archive","tag-llm","tag-news","tag-python"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Utilizing the Benzinga News Archive to Power your LLM - Benzinga APIs<\/title>\n<meta name=\"description\" content=\"The Benzinga News S3 bucket houses an extraordinary source of comprehensive data with the potential to power any Large Language Model (LLM), especially one related to finance.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Utilizing the Benzinga News Archive to Power your LLM - Benzinga APIs\" \/>\n<meta property=\"og:description\" content=\"The Benzinga News S3 bucket houses an extraordinary source of comprehensive data with the potential to power any Large Language Model (LLM), especially one related to finance.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/\" \/>\n<meta property=\"og:site_name\" content=\"Benzinga APIs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Benzinga\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-26T22:39:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-26T22:39:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/s3.amazonaws.com\/wp-uploads.benzinga-events.prod\/apis\/wp-content\/uploads\/2024\/02\/16194018\/uriel-sc-11KDtiUWRq4-unsplash-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1700\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Tommy Cotter\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Benzinga\" \/>\n<meta name=\"twitter:site\" content=\"@Benzinga\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tommy Cotter\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/blog\\\/utilizing-the-benzinga-news-archive-to-power-your-llm\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/blog\\\/utilizing-the-benzinga-news-archive-to-power-your-llm\\\/\"},\"author\":{\"name\":\"Tommy Cotter\",\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/#\\\/schema\\\/person\\\/0f1603d4e33f044ab59c4a9faf26f2a3\"},\"headline\":\"Utilizing the Benzinga News Archive to Power your LLM\",\"datePublished\":\"2024-02-26T22:39:42+00:00\",\"dateModified\":\"2024-02-26T22:39:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/blog\\\/utilizing-the-benzinga-news-archive-to-power-your-llm\\\/\"},\"wordCount\":1215,\"publisher\":{\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/blog\\\/utilizing-the-benzinga-news-archive-to-power-your-llm\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/uriel-sc-11KDtiUWRq4-unsplash-scaled.jpg\",\"keywords\":[\"Archive\",\"LLM\",\"News\",\"Python\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/blog\\\/utilizing-the-benzinga-news-archive-to-power-your-llm\\\/\",\"url\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/blog\\\/utilizing-the-benzinga-news-archive-to-power-your-llm\\\/\",\"name\":\"Utilizing the Benzinga News Archive to Power your LLM - Benzinga APIs\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/blog\\\/utilizing-the-benzinga-news-archive-to-power-your-llm\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/blog\\\/utilizing-the-benzinga-news-archive-to-power-your-llm\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/uriel-sc-11KDtiUWRq4-unsplash-scaled.jpg\",\"datePublished\":\"2024-02-26T22:39:42+00:00\",\"dateModified\":\"2024-02-26T22:39:49+00:00\",\"description\":\"The Benzinga News S3 bucket houses an extraordinary source of comprehensive data with the potential to power any Large Language Model (LLM), especially one related to finance.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/blog\\\/utilizing-the-benzinga-news-archive-to-power-your-llm\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/blog\\\/utilizing-the-benzinga-news-archive-to-power-your-llm\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/blog\\\/utilizing-the-benzinga-news-archive-to-power-your-llm\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/uriel-sc-11KDtiUWRq4-unsplash-scaled.jpg\",\"contentUrl\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/uriel-sc-11KDtiUWRq4-unsplash-scaled.jpg\",\"width\":2560,\"height\":1700},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/blog\\\/utilizing-the-benzinga-news-archive-to-power-your-llm\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Utilizing the Benzinga News Archive to Power your LLM\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/#website\",\"url\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/\",\"name\":\"Benzinga APIs\",\"description\":\"Accurate &amp; Lightning Fast - Cloud Based Financial Market Data &amp; APIs\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/#organization\",\"name\":\"Benzinga\",\"url\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/s3.amazonaws.com\\\/wp-uploads.benzinga-events.prod\\\/apis\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/05134917\\\/schema-image-default.jpg\",\"contentUrl\":\"https:\\\/\\\/s3.amazonaws.com\\\/wp-uploads.benzinga-events.prod\\\/apis\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/05134917\\\/schema-image-default.jpg\",\"width\":1043,\"height\":1043,\"caption\":\"Benzinga\"},\"image\":{\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Benzinga\",\"https:\\\/\\\/x.com\\\/Benzinga\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/#\\\/schema\\\/person\\\/0f1603d4e33f044ab59c4a9faf26f2a3\",\"name\":\"Tommy Cotter\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f2e16f21ac328f64382089661047faff4abc84c136d912b95dc55fc88fdf042f?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f2e16f21ac328f64382089661047faff4abc84c136d912b95dc55fc88fdf042f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f2e16f21ac328f64382089661047faff4abc84c136d912b95dc55fc88fdf042f?s=96&d=mm&r=g\",\"caption\":\"Tommy Cotter\"},\"url\":\"https:\\\/\\\/www.benzinga.com\\\/apis\\\/author\\\/thomascotterbenzinga-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Utilizing the Benzinga News Archive to Power your LLM - Benzinga APIs","description":"The Benzinga News S3 bucket houses an extraordinary source of comprehensive data with the potential to power any Large Language Model (LLM), especially one related to finance.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/","og_locale":"en_US","og_type":"article","og_title":"Utilizing the Benzinga News Archive to Power your LLM - Benzinga APIs","og_description":"The Benzinga News S3 bucket houses an extraordinary source of comprehensive data with the potential to power any Large Language Model (LLM), especially one related to finance.","og_url":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/","og_site_name":"Benzinga APIs","article_publisher":"https:\/\/www.facebook.com\/Benzinga","article_published_time":"2024-02-26T22:39:42+00:00","article_modified_time":"2024-02-26T22:39:49+00:00","og_image":[{"width":2560,"height":1700,"url":"https:\/\/s3.amazonaws.com\/wp-uploads.benzinga-events.prod\/apis\/wp-content\/uploads\/2024\/02\/16194018\/uriel-sc-11KDtiUWRq4-unsplash-scaled.jpg","type":"image\/jpeg"}],"author":"Tommy Cotter","twitter_card":"summary_large_image","twitter_creator":"@Benzinga","twitter_site":"@Benzinga","twitter_misc":{"Written by":"Tommy Cotter","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/#article","isPartOf":{"@id":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/"},"author":{"name":"Tommy Cotter","@id":"https:\/\/www.benzinga.com\/apis\/#\/schema\/person\/0f1603d4e33f044ab59c4a9faf26f2a3"},"headline":"Utilizing the Benzinga News Archive to Power your LLM","datePublished":"2024-02-26T22:39:42+00:00","dateModified":"2024-02-26T22:39:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/"},"wordCount":1215,"publisher":{"@id":"https:\/\/www.benzinga.com\/apis\/#organization"},"image":{"@id":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/#primaryimage"},"thumbnailUrl":"https:\/\/www.benzinga.com\/apis\/wp-content\/uploads\/2024\/02\/uriel-sc-11KDtiUWRq4-unsplash-scaled.jpg","keywords":["Archive","LLM","News","Python"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/","url":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/","name":"Utilizing the Benzinga News Archive to Power your LLM - Benzinga APIs","isPartOf":{"@id":"https:\/\/www.benzinga.com\/apis\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/#primaryimage"},"image":{"@id":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/#primaryimage"},"thumbnailUrl":"https:\/\/www.benzinga.com\/apis\/wp-content\/uploads\/2024\/02\/uriel-sc-11KDtiUWRq4-unsplash-scaled.jpg","datePublished":"2024-02-26T22:39:42+00:00","dateModified":"2024-02-26T22:39:49+00:00","description":"The Benzinga News S3 bucket houses an extraordinary source of comprehensive data with the potential to power any Large Language Model (LLM), especially one related to finance.","breadcrumb":{"@id":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/#primaryimage","url":"https:\/\/www.benzinga.com\/apis\/wp-content\/uploads\/2024\/02\/uriel-sc-11KDtiUWRq4-unsplash-scaled.jpg","contentUrl":"https:\/\/www.benzinga.com\/apis\/wp-content\/uploads\/2024\/02\/uriel-sc-11KDtiUWRq4-unsplash-scaled.jpg","width":2560,"height":1700},{"@type":"BreadcrumbList","@id":"https:\/\/www.benzinga.com\/apis\/blog\/utilizing-the-benzinga-news-archive-to-power-your-llm\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.benzinga.com\/apis\/"},{"@type":"ListItem","position":2,"name":"Utilizing the Benzinga News Archive to Power your LLM"}]},{"@type":"WebSite","@id":"https:\/\/www.benzinga.com\/apis\/#website","url":"https:\/\/www.benzinga.com\/apis\/","name":"Benzinga APIs","description":"Accurate &amp; Lightning Fast - Cloud Based Financial Market Data &amp; APIs","publisher":{"@id":"https:\/\/www.benzinga.com\/apis\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.benzinga.com\/apis\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.benzinga.com\/apis\/#organization","name":"Benzinga","url":"https:\/\/www.benzinga.com\/apis\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.benzinga.com\/apis\/#\/schema\/logo\/image\/","url":"https:\/\/s3.amazonaws.com\/wp-uploads.benzinga-events.prod\/apis\/wp-content\/uploads\/2022\/07\/05134917\/schema-image-default.jpg","contentUrl":"https:\/\/s3.amazonaws.com\/wp-uploads.benzinga-events.prod\/apis\/wp-content\/uploads\/2022\/07\/05134917\/schema-image-default.jpg","width":1043,"height":1043,"caption":"Benzinga"},"image":{"@id":"https:\/\/www.benzinga.com\/apis\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Benzinga","https:\/\/x.com\/Benzinga"]},{"@type":"Person","@id":"https:\/\/www.benzinga.com\/apis\/#\/schema\/person\/0f1603d4e33f044ab59c4a9faf26f2a3","name":"Tommy Cotter","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f2e16f21ac328f64382089661047faff4abc84c136d912b95dc55fc88fdf042f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f2e16f21ac328f64382089661047faff4abc84c136d912b95dc55fc88fdf042f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f2e16f21ac328f64382089661047faff4abc84c136d912b95dc55fc88fdf042f?s=96&d=mm&r=g","caption":"Tommy Cotter"},"url":"https:\/\/www.benzinga.com\/apis\/author\/thomascotterbenzinga-com\/"}]}},"_links":{"self":[{"href":"https:\/\/www.benzinga.com\/apis\/wp-json\/wp\/v2\/posts\/6935","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benzinga.com\/apis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benzinga.com\/apis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benzinga.com\/apis\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benzinga.com\/apis\/wp-json\/wp\/v2\/comments?post=6935"}],"version-history":[{"count":16,"href":"https:\/\/www.benzinga.com\/apis\/wp-json\/wp\/v2\/posts\/6935\/revisions"}],"predecessor-version":[{"id":6964,"href":"https:\/\/www.benzinga.com\/apis\/wp-json\/wp\/v2\/posts\/6935\/revisions\/6964"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.benzinga.com\/apis\/wp-json\/wp\/v2\/media\/6939"}],"wp:attachment":[{"href":"https:\/\/www.benzinga.com\/apis\/wp-json\/wp\/v2\/media?parent=6935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benzinga.com\/apis\/wp-json\/wp\/v2\/categories?post=6935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benzinga.com\/apis\/wp-json\/wp\/v2\/tags?post=6935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}