Stay Ahead, Stay ONMINE

LLM + RAG: Creating an AI-Powered File Reader Assistant

Introduction AI is everywhere.  It is hard not to interact at least once a day with a Large Language Model (LLM). The chatbots are here to stay. They’re in your apps, they help you write better, they compose emails, they read emails…well, they do a lot. And I don’t think that that is bad. In fact, my opinion is the other way – at least so far. I defend and advocate for the use of AI in our daily lives because, let’s agree, it makes everything much easier. I don’t have to spend time double-reading a document to find punctuation problems or type. AI does that for me. I don’t waste time writing that follow-up email every single Monday. AI does that for me. I don’t need to read a huge and boring contract when I have an AI to summarize the main takeaways and action points to me! These are only some of AI’s great uses. If you’d like to know more use cases of LLMs to make our lives easier, I wrote a whole book about them. Now, thinking as a data scientist and looking at the technical side, not everything is that bright and shiny.  LLMs are great for several general use cases that apply to anyone or any company. For example, coding, summarizing, or answering questions about general content created until the training cutoff date. However, when it comes to specific business applications, for a single purpose, or something new that didn’t make the cutoff date, that is when the models won’t be that useful if used out-of-the-box – meaning, they will not know the answer. Thus, it will need adjustments. Training an LLM model can take months and millions of dollars. What is even worse is that if we don’t adjust and tune the model to our purpose, there will be unsatisfactory results or hallucinations (when the model’s response doesn’t make sense given our query). So what is the solution, then? Spending a lot of money retraining the model to include our data? Not really. That’s when the Retrieval-Augmented Generation (RAG) becomes useful. RAG is a framework that combines getting information from an external knowledge base with large language models (LLMs). It helps AI models produce more accurate and relevant responses. Let’s learn more about RAG next. What is RAG? Let me tell you a story to illustrate the concept. I love movies. For some time in the past, I knew which movies were competing for the best movie category at the Oscars or the best actors and actresses. And I would certainly know which ones got the statue for that year. But now I am all rusty on that subject. If you asked me who was competing, I would not know. And even if I tried to answer you, I would give you a weak response.  So, to provide you with a quality response, I will do what everybody else does: search for the information online, obtain it, and then give it to you. What I just did is the same idea as the RAG: I obtained data from an external database to give you an answer. When we enhance the LLM with a content store where it can go and retrieve data to augment (increase) its knowledge base, that is the RAG framework in action. RAG is like creating a content store where the model can enhance its knowledge and respond more accurately. User prompt about Content C. LLM retrieves external content to aggregate to the answer. Image by the author. Summarizing: Uses search algorithms to query external data sources, such as databases, knowledge bases, and web pages. Pre-processes the retrieved information. Incorporates the pre-processed information into the LLM. Why use RAG? Now that we know what the RAG framework is let’s understand why we should be using it. Here are some of the benefits: Enhances factual accuracy by referencing real data. RAG can help LLMs process and consolidate knowledge to create more relevant answers  RAG can help LLMs access additional knowledge bases, such as internal organizational data  RAG can help LLMs create more accurate domain-specific content  RAG can help reduce knowledge gaps and AI hallucination As previously explained, I like to say that with the RAG framework, we are giving an internal search engine for the content we want it to add to the knowledge base. Well. All of that is very interesting. But let’s see an application of RAG. We will learn how to create an AI-powered PDF Reader Assistant. Project This is an application that allows users to upload a PDF document and ask questions about its content using AI-powered natural language processing (NLP) tools.  The app uses Streamlit as the front end. Langchain, OpenAI’s GPT-4 model, and FAISS (Facebook AI Similarity Search) for document retrieval and question answering in the backend. Let’s break down the steps for better understanding: Loading a PDF file and splitting it into chunks of text. This makes the data optimized for retrieval Present the chunks to an embedding tool. Embeddings are numerical vector representations of data used to capture relationships, similarities, and meanings in a way that machines can understand. They are widely used in Natural Language Processing (NLP), recommender systems, and search engines. Next, we put those chunks of text and embeddings in the same DB for retrieval. Finally, we make it available to the LLM. Data preparation Preparing a content store for the LLM will take some steps, as we just saw. So, let’s start by creating a function that can load a file and split it into text chunks for efficient retrieval. # Imports from langchain_community.document_loaders import PyPDFLoader from langchain.text_splitter import RecursiveCharacterTextSplitter def load_document(pdf): # Load a PDF “”” Load a PDF and split it into chunks for efficient retrieval. :param pdf: PDF file to load :return: List of chunks of text “”” loader = PyPDFLoader(pdf) docs = loader.load() # Instantiate Text Splitter with Chunk Size of 500 words and Overlap of 100 words so that context is not lost text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=100) # Split into chunks for efficient retrieval chunks = text_splitter.split_documents(docs) # Return return chunks Next, we will start building our Streamlit app, and we’ll use that function in the next script. Web application We will begin importing the necessary modules in Python. Most of those will come from the langchain packages. FAISS is used for document retrieval; OpenAIEmbeddings transforms the text chunks into numerical scores for better similarity calculation by the LLM; ChatOpenAI is what enables us to interact with the OpenAI API; create_retrieval_chain is what actually the RAG does, retrieving and augmenting the LLM with that data; create_stuff_documents_chain glues the model and the ChatPromptTemplate. Note: You will need to generate an OpenAI Key to be able to run this script. If it’s the first time you’re creating your account, you get some free credits. But if you have it for some time, it is possible that you will have to add 5 dollars in credits to be able to access OpenAI’s API. An option is using Hugging Face’s Embedding.  # Imports from langchain_community.vectorstores import FAISS from langchain_openai import OpenAIEmbeddings from langchain.chains import create_retrieval_chain from langchain_openai import ChatOpenAI from langchain.chains.combine_documents import create_stuff_documents_chain from langchain_core.prompts import ChatPromptTemplate from scripts.secret import OPENAI_KEY from scripts.document_loader import load_document import streamlit as st This first code snippet will create the App title, create a box for file upload, and prepare the file to be added to the load_document() function. # Create a Streamlit app st.title(“AI-Powered Document Q&A”) # Load document to streamlit uploaded_file = st.file_uploader(“Upload a PDF file”, type=”pdf”) # If a file is uploaded, create the TextSplitter and vector database if uploaded_file :     # Code to work around document loader from Streamlit and make it readable by langchain     temp_file = “./temp.pdf”     with open(temp_file, “wb”) as file:         file.write(uploaded_file.getvalue())         file_name = uploaded_file.name     # Load document and split it into chunks for efficient retrieval.     chunks = load_document(temp_file)     # Message user that document is being processed with time emoji     st.write(“Processing document… :watch:”) Machines understand numbers better than text, so in the end, we will have to provide the model with a database of numbers that it can compare and check for similarity when performing a query. That’s where the embeddings will be useful to create the vector_db, in this next piece of code. # Generate embeddings     # Embeddings are numerical vector representations of data, typically used to capture relationships, similarities,     # and meanings in a way that machines can understand. They are widely used in Natural Language Processing (NLP),     # recommender systems, and search engines.     embeddings = OpenAIEmbeddings(openai_api_key=OPENAI_KEY,                                   model=”text-embedding-ada-002″)     # Can also use HuggingFaceEmbeddings     # from langchain_huggingface.embeddings import HuggingFaceEmbeddings     # embeddings = HuggingFaceEmbeddings(model_name=”sentence-transformers/all-MiniLM-L6-v2″)     # Create vector database containing chunks and embeddings     vector_db = FAISS.from_documents(chunks, embeddings) Next, we create a retriever object to navigate in the vector_db. # Create a document retriever     retriever = vector_db.as_retriever()     llm = ChatOpenAI(model_name=”gpt-4o-mini”, openai_api_key=OPENAI_KEY) Then, we will create the system_prompt, which is a set of instructions to the LLM on how to answer, and we will create a prompt template, preparing it to be added to the model once we get the input from the user. # Create a system prompt     # It sets the overall context for the model.     # It influences tone, style, and focus before user interaction starts.     # Unlike user inputs, a system prompt is not visible to the end user.     system_prompt = (         “You are a helpful assistant. Use the given context to answer the question.”         “If you don’t know the answer, say you don’t know. ”         “{context}”     )     # Create a prompt Template     prompt = ChatPromptTemplate.from_messages(         [             (“system”, system_prompt),             (“human”, “{input}”),         ]     )     # Create a chain     # It creates a StuffDocumentsChain, which takes multiple documents (text data) and “stuffs” them together before passing them to the LLM for processing.     question_answer_chain = create_stuff_documents_chain(llm, prompt) Moving on, we create the core of the RAG framework, pasting together the retriever object and the prompt. This object adds relevant documents from a data source (e.g., a vector database) and makes it ready to be processed using an LLM to generate a response. # Creates the RAG      chain = create_retrieval_chain(retriever, question_answer_chain) Finally, we create the variable question for the user input. If this question box is filled with a query, we pass it to the chain, which calls the LLM to process and return the response, which will be printed on the app’s screen. # Streamlit input for question     question = st.text_input(“Ask a question about the document:”)     if question:         # Answer         response = chain.invoke({“input”: question})[‘answer’]         st.write(response) Here is a screenshot of the result. Screenshot of the final app. Image by the author. And this is a GIF for you to see the File Reader Ai Assistant in action! File Reader AI Assistant in action. Image by the author. Before you go In this project, we learned what the RAG framework is and how it helps the Llm to perform better and also perform well with specific knowledge. AI can be powered with knowledge from an instruction manual, databases from a company, some finance files, or contracts, and then become fine-tuned to respond accurately to domain-specific content queries. The knowledge base is augmented with a content store. To recap, this is how the framework works: 1️⃣ User Query → Input text is received. 2️⃣ Retrieve Relevant Documents → Searches a knowledge base (e.g., a database, vector store). 3️⃣ Augment Context → Retrieved documents are added to the input. 4️⃣ Generate Response → An LLM processes the combined input and produces an answer. GitHub repository https://github.com/gurezende/Basic-Rag About me If you liked this content and want to learn more about my work, here is my website, where you can also find all my contacts. https://gustavorsantos.me References https://cloud.google.com/use-cases/retrieval-augmented-generation https://www.ibm.com/think/topics/retrieval-augmented-generation https://python.langchain.com/docs/introduction https://www.geeksforgeeks.org/how-to-get-your-own-openai-api-key

Introduction

AI is everywhere. 

It is hard not to interact at least once a day with a Large Language Model (LLM). The chatbots are here to stay. They’re in your apps, they help you write better, they compose emails, they read emails…well, they do a lot.

And I don’t think that that is bad. In fact, my opinion is the other way – at least so far. I defend and advocate for the use of AI in our daily lives because, let’s agree, it makes everything much easier.

I don’t have to spend time double-reading a document to find punctuation problems or type. AI does that for me. I don’t waste time writing that follow-up email every single Monday. AI does that for me. I don’t need to read a huge and boring contract when I have an AI to summarize the main takeaways and action points to me!

These are only some of AI’s great uses. If you’d like to know more use cases of LLMs to make our lives easier, I wrote a whole book about them.

Now, thinking as a data scientist and looking at the technical side, not everything is that bright and shiny. 

LLMs are great for several general use cases that apply to anyone or any company. For example, coding, summarizing, or answering questions about general content created until the training cutoff date. However, when it comes to specific business applications, for a single purpose, or something new that didn’t make the cutoff date, that is when the models won’t be that useful if used out-of-the-box – meaning, they will not know the answer. Thus, it will need adjustments.

Training an LLM model can take months and millions of dollars. What is even worse is that if we don’t adjust and tune the model to our purpose, there will be unsatisfactory results or hallucinations (when the model’s response doesn’t make sense given our query).

So what is the solution, then? Spending a lot of money retraining the model to include our data?

Not really. That’s when the Retrieval-Augmented Generation (RAG) becomes useful.

RAG is a framework that combines getting information from an external knowledge base with large language models (LLMs). It helps AI models produce more accurate and relevant responses.

Let’s learn more about RAG next.

What is RAG?

Let me tell you a story to illustrate the concept.

I love movies. For some time in the past, I knew which movies were competing for the best movie category at the Oscars or the best actors and actresses. And I would certainly know which ones got the statue for that year. But now I am all rusty on that subject. If you asked me who was competing, I would not know. And even if I tried to answer you, I would give you a weak response. 

So, to provide you with a quality response, I will do what everybody else does: search for the information online, obtain it, and then give it to you. What I just did is the same idea as the RAG: I obtained data from an external database to give you an answer.

When we enhance the LLM with a content store where it can go and retrieve data to augment (increase) its knowledge base, that is the RAG framework in action.

RAG is like creating a content store where the model can enhance its knowledge and respond more accurately.

Diagram: User prompts and content using LLM + RAG
User prompt about Content C. LLM retrieves external content to aggregate to the answer. Image by the author.

Summarizing:

  1. Uses search algorithms to query external data sources, such as databases, knowledge bases, and web pages.
  2. Pre-processes the retrieved information.
  3. Incorporates the pre-processed information into the LLM.

Why use RAG?

Now that we know what the RAG framework is let’s understand why we should be using it.

Here are some of the benefits:

  • Enhances factual accuracy by referencing real data.
  • RAG can help LLMs process and consolidate knowledge to create more relevant answers 
  • RAG can help LLMs access additional knowledge bases, such as internal organizational data 
  • RAG can help LLMs create more accurate domain-specific content 
  • RAG can help reduce knowledge gaps and AI hallucination

As previously explained, I like to say that with the RAG framework, we are giving an internal search engine for the content we want it to add to the knowledge base.

Well. All of that is very interesting. But let’s see an application of RAG. We will learn how to create an AI-powered PDF Reader Assistant.

Project

This is an application that allows users to upload a PDF document and ask questions about its content using AI-powered natural language processing (NLP) tools. 

  • The app uses Streamlit as the front end.
  • Langchain, OpenAI’s GPT-4 model, and FAISS (Facebook AI Similarity Search) for document retrieval and question answering in the backend.

Let’s break down the steps for better understanding:

  1. Loading a PDF file and splitting it into chunks of text.
    1. This makes the data optimized for retrieval
  2. Present the chunks to an embedding tool.
    1. Embeddings are numerical vector representations of data used to capture relationships, similarities, and meanings in a way that machines can understand. They are widely used in Natural Language Processing (NLP), recommender systems, and search engines.
  3. Next, we put those chunks of text and embeddings in the same DB for retrieval.
  4. Finally, we make it available to the LLM.

Data preparation

Preparing a content store for the LLM will take some steps, as we just saw. So, let’s start by creating a function that can load a file and split it into text chunks for efficient retrieval.

# Imports
from  langchain_community.document_loaders import PyPDFLoader
from langchain.text_splitter import RecursiveCharacterTextSplitter

def load_document(pdf):
    # Load a PDF
    """
    Load a PDF and split it into chunks for efficient retrieval.

    :param pdf: PDF file to load
    :return: List of chunks of text
    """

    loader = PyPDFLoader(pdf)
    docs = loader.load()

    # Instantiate Text Splitter with Chunk Size of 500 words and Overlap of 100 words so that context is not lost
    text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=100)
    # Split into chunks for efficient retrieval
    chunks = text_splitter.split_documents(docs)

    # Return
    return chunks

Next, we will start building our Streamlit app, and we’ll use that function in the next script.

Web application

We will begin importing the necessary modules in Python. Most of those will come from the langchain packages.

FAISS is used for document retrieval; OpenAIEmbeddings transforms the text chunks into numerical scores for better similarity calculation by the LLM; ChatOpenAI is what enables us to interact with the OpenAI API; create_retrieval_chain is what actually the RAG does, retrieving and augmenting the LLM with that data; create_stuff_documents_chain glues the model and the ChatPromptTemplate.

Note: You will need to generate an OpenAI Key to be able to run this script. If it’s the first time you’re creating your account, you get some free credits. But if you have it for some time, it is possible that you will have to add 5 dollars in credits to be able to access OpenAI’s API. An option is using Hugging Face’s Embedding. 

# Imports
from langchain_community.vectorstores import FAISS
from langchain_openai import OpenAIEmbeddings
from langchain.chains import create_retrieval_chain
from langchain_openai import ChatOpenAI
from langchain.chains.combine_documents import create_stuff_documents_chain
from langchain_core.prompts import ChatPromptTemplate
from scripts.secret import OPENAI_KEY
from scripts.document_loader import load_document
import streamlit as st

This first code snippet will create the App title, create a box for file upload, and prepare the file to be added to the load_document() function.

# Create a Streamlit app
st.title("AI-Powered Document Q&A")

# Load document to streamlit
uploaded_file = st.file_uploader("Upload a PDF file", type="pdf")

# If a file is uploaded, create the TextSplitter and vector database
if uploaded_file :

    # Code to work around document loader from Streamlit and make it readable by langchain
    temp_file = "./temp.pdf"
    with open(temp_file, "wb") as file:
        file.write(uploaded_file.getvalue())
        file_name = uploaded_file.name

    # Load document and split it into chunks for efficient retrieval.
    chunks = load_document(temp_file)

    # Message user that document is being processed with time emoji
    st.write("Processing document... :watch:")

Machines understand numbers better than text, so in the end, we will have to provide the model with a database of numbers that it can compare and check for similarity when performing a query. That’s where the embeddings will be useful to create the vector_db, in this next piece of code.

# Generate embeddings
    # Embeddings are numerical vector representations of data, typically used to capture relationships, similarities,
    # and meanings in a way that machines can understand. They are widely used in Natural Language Processing (NLP),
    # recommender systems, and search engines.
    embeddings = OpenAIEmbeddings(openai_api_key=OPENAI_KEY,
                                  model="text-embedding-ada-002")

    # Can also use HuggingFaceEmbeddings
    # from langchain_huggingface.embeddings import HuggingFaceEmbeddings
    # embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")

    # Create vector database containing chunks and embeddings
    vector_db = FAISS.from_documents(chunks, embeddings)

Next, we create a retriever object to navigate in the vector_db.

# Create a document retriever
    retriever = vector_db.as_retriever()
    llm = ChatOpenAI(model_name="gpt-4o-mini", openai_api_key=OPENAI_KEY)

Then, we will create the system_prompt, which is a set of instructions to the LLM on how to answer, and we will create a prompt template, preparing it to be added to the model once we get the input from the user.

# Create a system prompt
    # It sets the overall context for the model.
    # It influences tone, style, and focus before user interaction starts.
    # Unlike user inputs, a system prompt is not visible to the end user.

    system_prompt = (
        "You are a helpful assistant. Use the given context to answer the question."
        "If you don't know the answer, say you don't know. "
        "{context}"
    )

    # Create a prompt Template
    prompt = ChatPromptTemplate.from_messages(
        [
            ("system", system_prompt),
            ("human", "{input}"),
        ]
    )

    # Create a chain
    # It creates a StuffDocumentsChain, which takes multiple documents (text data) and "stuffs" them together before passing them to the LLM for processing.

    question_answer_chain = create_stuff_documents_chain(llm, prompt)

Moving on, we create the core of the RAG framework, pasting together the retriever object and the prompt. This object adds relevant documents from a data source (e.g., a vector database) and makes it ready to be processed using an LLM to generate a response.

# Creates the RAG
     chain = create_retrieval_chain(retriever, question_answer_chain)

Finally, we create the variable question for the user input. If this question box is filled with a query, we pass it to the chain, which calls the LLM to process and return the response, which will be printed on the app’s screen.

# Streamlit input for question
    question = st.text_input("Ask a question about the document:")
    if question:
        # Answer
        response = chain.invoke({"input": question})['answer']
        st.write(response)

Here is a screenshot of the result.

Screenshot of the AI-Powered Document Q&A
Screenshot of the final app. Image by the author.

And this is a GIF for you to see the File Reader Ai Assistant in action!

GIF of the File Reader AI Assistant in action
File Reader AI Assistant in action. Image by the author.

Before you go

In this project, we learned what the RAG framework is and how it helps the Llm to perform better and also perform well with specific knowledge.

AI can be powered with knowledge from an instruction manual, databases from a company, some finance files, or contracts, and then become fine-tuned to respond accurately to domain-specific content queries. The knowledge base is augmented with a content store.

To recap, this is how the framework works:

1️⃣ User Query → Input text is received.

2️⃣ Retrieve Relevant Documents → Searches a knowledge base (e.g., a database, vector store).

3️⃣ Augment Context → Retrieved documents are added to the input.

4️⃣ Generate Response → An LLM processes the combined input and produces an answer.

GitHub repository

https://github.com/gurezende/Basic-Rag

About me

If you liked this content and want to learn more about my work, here is my website, where you can also find all my contacts.

https://gustavorsantos.me

References

https://cloud.google.com/use-cases/retrieval-augmented-generation

https://www.ibm.com/think/topics/retrieval-augmented-generation

https://youtu.be/T-D1OfcDW1M?si=G0UWfH5-wZnMu0nw

https://python.langchain.com/docs/introduction

https://www.geeksforgeeks.org/how-to-get-your-own-openai-api-key

Shape
Shape
Stay Ahead

Explore More Insights

Stay ahead with more perspectives on cutting-edge power, infrastructure, energy,  bitcoin and AI solutions. Explore these articles to uncover strategies and insights shaping the future of industries.

Shape

Cerebras reimagines AI cluster design with switchless CS-4 architecture

Inside the Cerebras fabric, the trade-off is different. Direct Wafer Links are proprietary, so third-party accelerators cannot be added to the fabric. Scaling it requires additional Cerebras systems, Shah said. Faruqui said the operational divide may be more significant than the physical networking challenge. Existing orchestration environments are generally designed

Read More »

IBM moves closer to fault-tolerant quantum computing at scale

“This is our first shared ultra cold environment that allows multiple chips within to be connected together, and it really provides enough space for all the high-density wiring that’s needed,” explained IBM Fellow Jerry Chow, CTO, quantum-centric supercomputing, during a media briefing. “So we’re really starting to architect the entire

Read More »

Reports: Google partnering with AMD for next-gen hybrid TPU

For AMD, meanwhile, a role in Google’s next-generation TPU program would provide another indication that its CPU and chip-design technologies are becoming relevant to the rapidly expanding custom AI accelerator market. One analyst approved of the proposed alliance. “I think it makes good sense. AMD has more than proven that they’re

Read More »

Why 6 GHz Wi-Fi will make or break the modern enterprise

To date, 6 GHz Wi‑Fi deployments across enterprises remain in their early stages, with only a subset of organizations moving aggressively beyond Wi‑Fi 6 and legacy bands. Most corporate campuses, manufacturing plants, healthcare facilities, and retail environments continue to run primarily on 2.4 GHz and 5 GHz, even as their

Read More »

Energy Secretary Keeps Coal-Fired Generation Operational in the Midwest

WASHINGTON—U.S. Secretary of Energy Chris Wright issued an emergency order to address critical grid reliability issues in the Midwest. The emergency order directs the Midwest Independent System Operator (MISO), in coordination with Consumers Energy, to ensure that the 1,420-megawatt (MW) J.H. Campbell coal-fired power plant (Campbell Plant) in West Olive, Michigan is available to operate and to employ economic dispatch to minimize costs for American families and businesses. The Campbell Plant was originally scheduled to shut down on May 31, 2025, 15 years before the end of its scheduled design life. Since the U.S. Department of Energy’s (DOE) original order issued on May 23, 2205, the Campbell Plant has proven critical to MISO’s operations, operating regularly during periods of high energy demand and low levels of intermittent energy production. Subsequent orders were issued throughout 2025 and 2026. This order is in effect beginning on August 17, 2026, through November 14, 2026. “President Trump and the Energy Department remain committed to doing everything in our power to mitigate the possibility of power outages for American families and businesses,” Secretary Wright said. “Ensuring coal plants such as the Campbell Plant are available to operate during periods of high electricity demand saves lives. Americans deserve access to affordable, reliable, and secure electricity regardless of whether the wind is blowing or the sun is shining.” In January 2026, North American Electric Reliability Corporation (NERC) released its 2025 Long-Term Reliability Assessment. NERC assessed that the MISO region is at high risk of energy shortfalls over the next five years, stating that it faces significant reliability challenges as “projected resource additions do not keep pace with escalating demand forecasts and announced generator retirements.” NERC released its 2026 State of Reliability (SOR) on June 4, 2026. In its technical discussion of major system events, NERC states “shoulder reasons

Read More »

Hydrocarbons and Geothermal Energy Office Announces Up to $10.75 Million to Support University Training and Research for Subsurface Energy Development

WASHINGTON—The U.S. Department of Energy’s (DOE) Hydrocarbons and Geothermal Energy Office (HGEO) today announced up to $10.75 million in federal funding to support novel, early-stage research and development (R&D) projects at eligible U.S. colleges and universities. The funding opportunity is offered through HGEO’s University Training and Research (UTR) Program, which aims to train the next generation of engineers and scientists for careers in energy-related research to help ensure affordable, reliable, and secure energy for all Americans. “Continuing to increase domestic energy production from our vast coal, oil, gas, and geothermal resources requires a workforce of trained, qualified professionals to advance innovative subsurface energy technologies,” said DOE Acting Assistant Secretary of the Hydrocarbons and Geothermal Energy Office Curt Coccodrilli. “By investing in skills-based training that emphasizes industry-driven strategies, we will help meet the needs of our evolving energy economy while strengthening America’s energy leadership and independence.”  Funding awarded under this notice of funding opportunity (NOFO) is intended to increase R&D opportunities for students in science, technology, engineering and mathematics. Relevant academic disciplines include, but are not limited to engineering, chemistry, physics, mining, geosciences, computer science and education.  Selected projects will support one topic area—Innovative Research and Training for Subsurface Energy Production. This topic area seeks university-led R&D proposals focused on accelerating innovative energy technologies toward commercial viability while simultaneously developing a skilled workforce for the evolving energy sector. The topic area is split into three subtopics  focused on coal, oil and gas, and geothermal energy, respectively, ensuring that projects awarded through the UTR Program complement the R&D investments from HGEO’s Office of Subsurface Energy. Projects will address critical workforce skill gaps by integrating student participation directly into the R&D process and developing training modules that will have a lasting impact on student training beyond the awarded project. In addition, projects must include a non-academic partner to ensure research relevance

Read More »

Energy Department Modernizes National Laboratory Operations to Strengthen America’s Scientific, Energy, and National Security Missions

WASHINGTON—The U.S. Department of Energy (DOE) today announced updated operating directives for its National Laboratories, plants, and sites as part of a broader effort to modernize operations across DOE’s laboratory complex.  To advance President Trump’s commitment to Restoring Gold Standard Science, DOE is updating outdated and duplicative operating requirements to give its world-class scientific workforce more time to focus on critical science, energy, and national security missions. These reforms will improve efficiency, strengthen stewardship of taxpayer resources, and help DOE’s National Laboratories, plants, and sites operate with the speed, discipline, and agility their missions demand, while maintaining rigorous safety and security standards.  “America’s National Laboratories are among our nation’s greatest scientific assets and have powered generations of American discovery and innovation,” said U.S. Secretary of Energy Chris Wright. “President Trump has called on DOE to build on that legacy by restoring Gold Standard Science and unleashing the full potential of American ingenuity. By removing unnecessary barriers, we are giving our scientists, engineers, and technicians, more freedom to focus on the critical missions that matter most.” Working with laboratory leaders and subject matter experts, DOE reviewed a targeted set of directives governing day-to-day field operations. Its reforms build on more than three decades of recommendations from Congress, the Government Accountability Office, the National Academies, and other independent reviews that have identified unnecessary complexity in DOE’s directives framework.  DOE is acting on these longstanding recommendations while preserving strong oversight, accountability, and operational excellence—including strong protections for DOE workers, the public, the environment, and the Nation’s nuclear security enterprise.   DOE’s National Laboratories, plants, and sites carry out some of the nation’s most consequential scientific, engineering, and national security missions. Today’s action better aligns their operations with the pace and complexity of today’s missions, giving its scientific workforce more time to develop technologies, strengthen American

Read More »

Energy Secretary Announces Cancellation of Three Proposed National Interest Electric Transmission Corridors

WASHINGTON—U.S. Secretary of Energy Chris Wright today announced that the U.S. Department of Energy (DOE) will not move forward with designating the three proposed National Interest Electric Transmission Corridors (NIETCs) previously selected in December 2024 to advance in the review process. “Extensive review, including public feedback and stakeholder input, made clear that the current designation process for these three proposed transmission corridors should not continue,” said Secretary Wright. “Transmission policy must serve the American people—not special interests or a climate-alarmist agenda that drives up costs, worsens reliability, and disregards the concerns of local communities. The Trump Administration is committed to strengthening America’s electric grid with common-sense policies that prioritize delivering affordable, reliable, and secure electricity to American families and businesses.” The previous administration touted the Lake Erie–Canada Corridor, the Southwestern Grid Connector Corridor, and the Tribal Energy Access Corridor, as a means to advance their Green New Scam agenda and “accelerate decarbonization.” As the process unfolded, the current designation framework proved ineffective in strengthening grid reliability and reducing electricity costs. In some communities, it also contributed to confusion and concern about the scope and intent of NIETC authority. Thanks to President Trump and Secretary Wright, DOE has already taken numerous steps to build new transmission infrastructure and modernize existing infrastructure, including: In October 2025, DOE’s Office of Energy Dominance Financing (EDF) closed a $1.6 billion loan guarantee to AEP Transmission to reconductor and rebuild nearly 5,000 miles of transmission lines across five states.  In February 2026, DOE’s Office of Energy Dominance Financing (EDF) closed $26.5 billion in loans to Southern Company subsidiaries Georgia power and Alabama Power to support generation and grid investments, including more than 1,300 miles of transmission and grid enhancement projects.  In March 2026, DOE’s Office of Electricity (OE) announced the $1.9 billion SPARK funding opportunity to

Read More »

Permian Resources lifts forecast on working interest gains, acquisitions

@import url(‘https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap’); .ebm-page__main h1, .ebm-page__main h2, .ebm-page__main h3, .ebm-page__main h4, .ebm-page__main h5, .ebm-page__main h6 { font-family: Inter; } body { line-height: 150%; letter-spacing: 0.025em; } button, .ebm-button-wrapper { font-family: Inter; } .label-style { text-transform: uppercase; color: var(–color-grey); font-weight: 600; font-size: 0.75rem; } .caption-style { font-size: 0.75rem; opacity: .6; } #onetrust-pc-sdk [id*=btn-handler], #onetrust-pc-sdk [class*=btn-handler] { background-color: #c19a06 !important; border-color: #c19a06 !important; } #onetrust-policy a, #onetrust-pc-sdk a, #ot-pc-content a { color: #c19a06 !important; } #onetrust-consent-sdk #onetrust-pc-sdk .ot-active-menu { border-color: #c19a06 !important; } #onetrust-consent-sdk #onetrust-accept-btn-handler, #onetrust-banner-sdk #onetrust-reject-all-handler, #onetrust-consent-sdk #onetrust-pc-btn-handler.cookie-setting-link { background-color: #c19a06 !important; border-color: #c19a06 !important; } #onetrust-consent-sdk .onetrust-pc-btn-handler { color: #c19a06 !important; border-color: #c19a06 !important; } The leaders of Permian Resources Corp., Midland, have lifted their production and capital spending forecasts for 2026 after recently closing on a $520 million acquisition, exercising an option for a 5,600-acre bolt-on buy and growing its working interest in completed wells more than expected. Permian Resources on July 31 closed on the purchase of about 20,500 acres in the Delaware basin’s Ward County that are largely non-operated and produce about 5,000 boe/d. The land sits adjacent to Permian property but James Walter, co-chief executive officer, told analysts on Aug. 6 that his team have since struck a deal with another operator that will trade some of the acquired bolt-on parcels as well as other acreage with goals of densifying Permian Resources’ holdings and lowering the share of acres that are non-operated or have low working interest. Permian Resources Corp. Permian Resources’ trade in Ward County with another operator is expected to close later this quarter. <!–> ]–> “The trade also increases the number of operating net locations from 50 to 120 while increasing the average lateral length by 20%,” Hickey said. “We view this trade as a true win-win for [Permian Resources] and our counterparty, who

Read More »

Canada rig count down 3 units

The rig count in Canada fell by 3 units to 216 rigs working for the week ended Aug. 7, according to data from Baker Hughes. A 4-rig drop in oil-directed rigs in Canada was partially offset by a 2-unit gain in gas-directed rigs. There were 146 oil-directed rigs working in Canada this week, while those drilling for gas ended the week at 65 units working. The overall US drilling rig count was unchanged this week at 588 rigs working. That number is up 49 units from this time last year. In the US, 3 additional rigs were drilling for oil, bringing the total count to 454. That number is up 43 units from this time last year. The number of gas-directed rigs fell by 3 to 124 working for the week. This time last year, 123 rigs were drilling for gas in the US. There were 572 rigs drilling on US land this week, unchanged from last week and up 48 from the year-ago period. A 1-rig increase in offshore rigs offset a 1-unit decrease in rigs drilling in inland waters. There were 14 rigs drilling offshore and 2 in inland waters this week. Leading the major oil-and gas-producing states was Texas with a 2-unit gain to end the week with 275 rigs working. The count is up 32 units from this time in 2025. Pennsylvania and Wyoming each dropped a rig to bring the respective rig counts to 16 and 15 for the week.

Read More »

Texas Tightens Oversight of Data Center Development

Texas has spent the past decade building one of the most data center-friendly policy environments in the United States. But the state’s political posture is tightening. The emerging message from Austin is that continued data center growth will face greater scrutiny over grid costs, water use, tax incentives and community impacts. What is interesting about this policy conversation is that the Texas Legislature is not in regular session. The 89th regular session ended June 2, 2025, and the 90th Legislature does not convene until January 12, 2027. What has occurred instead is a concentrated period of interim committee work, gubernatorial recommendations, implementation of Senate Bill 6, calls for a special session, and regulatory action by the Public Utility Commission of Texas and the Electric Reliability Council of Texas. Together, those efforts are creating the framework for a broader legislative debate in 2027 while already affecting projects seeking ERCOT interconnection, infrastructure costs and site-selection decisions. Abbott Sets Out a New Policy Framework The policy shift accelerated June 10, when Gov. Greg Abbott directed the PUCT to require data centers to fully fund the electric infrastructure needed to serve their operations and directed PUCT and ERCOT to identify additional actions available under existing authority. Separately, Abbott pledged to work with lawmakers in 2027 on legislation requiring data centers to add electric capacity, use water-efficient cooling systems, report electricity and water use, phase out outdated tax incentives and adopt additional protections for neighboring communities. The most consequential shift began June 10, when Gov. Greg Abbott sent state electricity regulators a sweeping list of data center policy priorities. Abbott called for future legislation requiring new facilities to add generation to the Texas grid, pay the full cost of their interconnection and related infrastructure, use closed-loop or similarly water-efficient cooling systems, and file annual reports

Read More »

NVIDIA Pushes the AI Factory From Rack to Asset Class

Making Compute Underwritable Huang expanded the argument a day later in an NVIDIA blog describing AI factory compute as an emerging investable asset class. NVIDIA’s case begins with a definition. The company does not describe its compute platform simply as a GPU. It includes accelerated computing, networking, systems software, AI frameworks and the CUDA software ecosystem surrounding the hardware. That wider platform matters to the financing thesis because NVIDIA argues it increases the number of potential users for an installed AI system. An NVIDIA DSX AI factory could support language models, vision, speech, biological computing, robotics, physical AI and other workloads. The same infrastructure could potentially move among customers, clouds or operators as demand changes. In financial terms, NVIDIA is arguing for fungibility. That could become particularly important to lenders and infrastructure investors trying to determine what happens if an original customer disappears, a contract expires or the economics of a particular workload change. A GPU cluster tied economically to one speculative tenant is one thing. Compute that can be redeployed across a large global market of clouds, enterprises, AI developers and model providers is a different risk proposition. NVIDIA contends that this breadth of potential offtakers helps protect residual value. Whether institutional markets ultimately price that risk the way NVIDIA hopes remains to be seen. But the company is now explicitly trying to establish a financial framework around that premise. Challenging the Traditional Depreciation Curve NVIDIA’s second argument is that software can extend the economic life of installed hardware. CUDA is central to that case. The company maintains that successive software improvements can increase the performance and efficiency of systems that have already been deployed, allowing the same hardware to produce more useful work at lower cost over time. That does not eliminate hardware obsolescence. New GPU generations continue

Read More »

The Next Data Center Constraint: Trust

When Facts Aren’t Enough Few places offer a more revealing test case than Loudoun County, Virginia. Data Center Alley has spent decades living with data center development at a scale most emerging markets will never approach. Rizer said Loudoun’s experience gives the county an unusually deep record with which to answer questions about environmental impacts, infrastructure and economic benefits. But those facts increasingly struggle to penetrate the broader public debate. Rizer said Loudoun today has more than 250 data centers, while the entire sector uses less than 10% of the county water system. He also pointed to improved air quality over the past decade and approximately $1.2 billion in tax revenue from the industry. Yet he acknowledged that simply producing another data point does little good when residents no longer trust the people presenting it. “I call it community concern whack-a-mole, because every time you address one thing, there are three others that pop up,” Rizer said. The problem, in his view, has become partly emotional rather than informational. “You can’t change how people think until you change how they feel,” he said. “And right now they feel angry, they feel confused, they are fearful, they are mistrustful, both of government and the big tech industry.” That distinction matters. The industry’s instinct has often been to counter criticism with facts: tax receipts, job numbers, water-use calculations, emissions data or explanations of how a particular cooling system works. Those facts remain important. But Rizer’s argument is that the industry must first rebuild enough credibility for communities to hear them. The Industry’s Unforced Errors Not all of the distrust has arrived from outside the industry. Rizer and Waitkunas were equally pointed about mistakes by developers and operators that have given opponents powerful examples to use against data center projects elsewhere. “The industry

Read More »

Reports: Data Center Expansion Finds Its Contours

AI Density Is Arriving Unevenly Inside the data center, the AI transition remains equally uneven. Uptime’s 2026 survey found the average modal, or most common, rack density across respondents exceeding 11 kW for the first time, up from 9 kW in 2025. But that number requires context. A relatively small group of very high-density facilities pulls the average upward. Without those facilities, Uptime puts average modal rack density at 7.8 kW, only modestly higher than 7.5 kW in 2025. The industry therefore continues to operate two realities at once: a vast installed base running conventional rack densities and a rapidly emerging class of AI facilities pushing far beyond them. The latter is becoming more visible. Some 24% of Uptime respondents now report racks at 30 kW or higher, up from 19% last year. Much of the increase occurred above 50 kW, and some operators reported deployments exceeding 100 kW. Still, most surveyed facilities have no racks at 30 kW or above. AI inference is also moving up the density curve. For the first time in Uptime’s survey, generative AI inference matched AI training as a driver of respondents’ highest-density deployments, with 21% citing each workload. That matters because inference potentially pushes AI infrastructure requirements beyond a relatively concentrated population of model-training campuses and into a broader set of facilities and markets. Power Is Both Constraint and Risk No issue connects the three reports more consistently than power. It limits new site availability. It redirects development toward emerging markets. It shapes community debates. It affects density and cooling architecture. And once a facility is operating, it remains the largest source of outage risk. Uptime says 56% of operators who experienced an impactful outage identified power as the primary cause of their most recent incident. The institute cautions against treating the increase

Read More »

DCF Poll: What Will Constrain Data Center Growth Next?

Matt Vincent is Editor in Chief of Data Center Frontier, where he leads editorial strategy and coverage focused on the infrastructure powering cloud computing, artificial intelligence, and the digital economy. A veteran B2B technology journalist with more than two decades of experience, Vincent specializes in the intersection of data centers, power, cooling, and emerging AI-era infrastructure. Since assuming the EIC role in 2023, he has helped guide Data Center Frontier’s coverage of the industry’s transition into the gigawatt-scale AI era, with a focus on hyperscale development, behind-the-meter power strategies, liquid cooling architectures, and the evolving energy demands of high-density compute, while working closely with the Digital Infrastructure Group at Endeavor Business Media to expand the brand’s analytical and multimedia footprint. Vincent also hosts The Data Center Frontier Show podcast, where he interviews industry leaders across hyperscale, colocation, utilities, and the data center supply chain to examine the technologies and business models reshaping digital infrastructure. Since its inception he serves as Head of Content for the Data Center Frontier Trends Summit. Before becoming Editor in Chief, he served in multiple senior editorial roles across Endeavor Business Media’s digital infrastructure portfolio, with coverage spanning data centers and hyperscale infrastructure, structured cabling and networking, telecom and datacom, IP physical security, and wireless and Pro AV markets. He began his career in 2005 within PennWell’s Advanced Technology Division and later held senior editorial positions supporting brands such as Cabling Installation & Maintenance, Lightwave Online, Broadband Technology Report, and Smart Buildings Technology. Vincent is a frequent moderator, interviewer, and keynote speaker at industry events including the HPC Forum, where he delivers forward-looking analysis on how AI and high-performance computing are reshaping digital infrastructure. He graduated with honors from Indiana University Bloomington with a B.A. in English Literature and Creative Writing and lives in southern New Hampshire with

Read More »

Is your networking built for AI’s traffic patterns and data volumes?

As data centers evolve into AI factories, compute has shifted from a cost center to a revenue driver. “Compute is revenue,” said Jensen Huang, co-founder and CEO of NVIDIA. “Without compute, there is no way to generate tokens. Without tokens, there’s no way to generate revenue. So, in this new world of AI, compute equals revenue.” This reframe changes an organizations’ calculus. If compute is revenue, what do you optimize for? Here are 5 questions to consider: Are you measuring what actually drives AI factory revenue? Most AI factories are power-constrained, so tokens per watt dictate how much revenue you can generate and the cost per token impacts the AI factory profit margin. But neither of these metrics should be evaluated at a single operating point. Batch jobs, real-time chat, and agentic workloads demand different points on the throughput-latency curve. AI chips that perform well at only a few points will underserve the full range of workloads. Additional key operational metrics like time to first token (TTFT), mean time between interruptions (MTBI), and platform useful life are the bedrock of AI factory efficiency. They dictate how quickly an AI factory comes online to generate tokens, the reliability of its revenue streams, and its long-term ability to remain productive as AI workloads evolve. How does agentic AI change what your CPU needs to deliver? Data center CPUs have historically been optimized for parallel throughput, where more cores improve aggregate capacity.  Agentic workloads run in loops and make different demands. The model reasons on the GPU, the CPU executes tool calls such as code compilation and data retrieval, and the result returns to the GPU so the model can reason again. Every step runs in sequence, gated by the one before it. Per-core performance and memory latency determine how fast each step

Read More »

Microsoft will invest $80B in AI data centers in fiscal 2025

And Microsoft isn’t the only one that is ramping up its investments into AI-enabled data centers. Rival cloud service providers are all investing in either upgrading or opening new data centers to capture a larger chunk of business from developers and users of large language models (LLMs).  In a report published in October 2024, Bloomberg Intelligence estimated that demand for generative AI would push Microsoft, AWS, Google, Oracle, Meta, and Apple would between them devote $200 billion to capex in 2025, up from $110 billion in 2023. Microsoft is one of the biggest spenders, followed closely by Google and AWS, Bloomberg Intelligence said. Its estimate of Microsoft’s capital spending on AI, at $62.4 billion for calendar 2025, is lower than Smith’s claim that the company will invest $80 billion in the fiscal year to June 30, 2025. Both figures, though, are way higher than Microsoft’s 2020 capital expenditure of “just” $17.6 billion. The majority of the increased spending is tied to cloud services and the expansion of AI infrastructure needed to provide compute capacity for OpenAI workloads. Separately, last October Amazon CEO Andy Jassy said his company planned total capex spend of $75 billion in 2024 and even more in 2025, with much of it going to AWS, its cloud computing division.

Read More »

John Deere unveils more autonomous farm machines to address skill labor shortage

Join our daily and weekly newsletters for the latest updates and exclusive content on industry-leading AI coverage. Learn More Self-driving tractors might be the path to self-driving cars. John Deere has revealed a new line of autonomous machines and tech across agriculture, construction and commercial landscaping. The Moline, Illinois-based John Deere has been in business for 187 years, yet it’s been a regular as a non-tech company showing off technology at the big tech trade show in Las Vegas and is back at CES 2025 with more autonomous tractors and other vehicles. This is not something we usually cover, but John Deere has a lot of data that is interesting in the big picture of tech. The message from the company is that there aren’t enough skilled farm laborers to do the work that its customers need. It’s been a challenge for most of the last two decades, said Jahmy Hindman, CTO at John Deere, in a briefing. Much of the tech will come this fall and after that. He noted that the average farmer in the U.S. is over 58 and works 12 to 18 hours a day to grow food for us. And he said the American Farm Bureau Federation estimates there are roughly 2.4 million farm jobs that need to be filled annually; and the agricultural work force continues to shrink. (This is my hint to the anti-immigration crowd). John Deere’s autonomous 9RX Tractor. Farmers can oversee it using an app. While each of these industries experiences their own set of challenges, a commonality across all is skilled labor availability. In construction, about 80% percent of contractors struggle to find skilled labor. And in commercial landscaping, 86% of landscaping business owners can’t find labor to fill open positions, he said. “They have to figure out how to do

Read More »

2025 playbook for enterprise AI success, from agents to evals

Join our daily and weekly newsletters for the latest updates and exclusive content on industry-leading AI coverage. Learn More 2025 is poised to be a pivotal year for enterprise AI. The past year has seen rapid innovation, and this year will see the same. This has made it more critical than ever to revisit your AI strategy to stay competitive and create value for your customers. From scaling AI agents to optimizing costs, here are the five critical areas enterprises should prioritize for their AI strategy this year. 1. Agents: the next generation of automation AI agents are no longer theoretical. In 2025, they’re indispensable tools for enterprises looking to streamline operations and enhance customer interactions. Unlike traditional software, agents powered by large language models (LLMs) can make nuanced decisions, navigate complex multi-step tasks, and integrate seamlessly with tools and APIs. At the start of 2024, agents were not ready for prime time, making frustrating mistakes like hallucinating URLs. They started getting better as frontier large language models themselves improved. “Let me put it this way,” said Sam Witteveen, cofounder of Red Dragon, a company that develops agents for companies, and that recently reviewed the 48 agents it built last year. “Interestingly, the ones that we built at the start of the year, a lot of those worked way better at the end of the year just because the models got better.” Witteveen shared this in the video podcast we filmed to discuss these five big trends in detail. Models are getting better and hallucinating less, and they’re also being trained to do agentic tasks. Another feature that the model providers are researching is a way to use the LLM as a judge, and as models get cheaper (something we’ll cover below), companies can use three or more models to

Read More »

OpenAI’s red teaming innovations define new essentials for security leaders in the AI era

Join our daily and weekly newsletters for the latest updates and exclusive content on industry-leading AI coverage. Learn More OpenAI has taken a more aggressive approach to red teaming than its AI competitors, demonstrating its security teams’ advanced capabilities in two areas: multi-step reinforcement and external red teaming. OpenAI recently released two papers that set a new competitive standard for improving the quality, reliability and safety of AI models in these two techniques and more. The first paper, “OpenAI’s Approach to External Red Teaming for AI Models and Systems,” reports that specialized teams outside the company have proven effective in uncovering vulnerabilities that might otherwise have made it into a released model because in-house testing techniques may have missed them. In the second paper, “Diverse and Effective Red Teaming with Auto-Generated Rewards and Multi-Step Reinforcement Learning,” OpenAI introduces an automated framework that relies on iterative reinforcement learning to generate a broad spectrum of novel, wide-ranging attacks. Going all-in on red teaming pays practical, competitive dividends It’s encouraging to see competitive intensity in red teaming growing among AI companies. When Anthropic released its AI red team guidelines in June of last year, it joined AI providers including Google, Microsoft, Nvidia, OpenAI, and even the U.S.’s National Institute of Standards and Technology (NIST), which all had released red teaming frameworks. Investing heavily in red teaming yields tangible benefits for security leaders in any organization. OpenAI’s paper on external red teaming provides a detailed analysis of how the company strives to create specialized external teams that include cybersecurity and subject matter experts. The goal is to see if knowledgeable external teams can defeat models’ security perimeters and find gaps in their security, biases and controls that prompt-based testing couldn’t find. What makes OpenAI’s recent papers noteworthy is how well they define using human-in-the-middle

Read More »