← Latest papers
💻 computer science

Towards Energy-aware Requirements Dependency Classification: Knowledge-Graph vs. Vector-Retrieval Augmented Inference with SLMs

This paper proposes and empirically evaluates an energy-aware framework that compares Knowledge Graph-based and Vector-based retrieval methods to enhance the sustainability and accuracy of Small Language Models (7B–8B) in detecting conflicting software requirements.

Original authors: Shreyas Patil, Pragati Kumari, Novarun Deb, Gouri Ginde

Published 2026-03-26
📖 6 min read🧠 Deep dive

Original authors: Shreyas Patil, Pragati Kumari, Novarun Deb, Gouri Ginde

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are the head chef of a massive, chaotic kitchen. Every day, hundreds of new recipe requests (called Requirements) come in. Your job is to spot which recipes contradict each other before you start cooking. For example, one request says, "The cake must be baked at 400°F," while another says, "The cake must be baked at 200°F." If you don't catch this conflict early, you waste ingredients, time, and energy.

In the world of software, this is called Requirements Engineering. Traditionally, humans did this checking, which is slow and tiring. Recently, we started using super-smart AI chefs (called Large Language Models or LLMs) to do it for us. But here's the catch: these super-AIs are like giant, gas-guzzling trucks. They are incredibly powerful, but they burn a massive amount of electricity and produce a lot of carbon pollution just to think about a single sentence.

This paper asks a simple but crucial question: Can we use smaller, more efficient AI chefs (called Small Language Models or SLMs) to do the same job without wasting the planet's energy?

To answer this, the researchers tried two different ways to help these small chefs find the right information before they start cooking.

The Two Search Strategies

Imagine the small chef needs to check if a new recipe conflicts with old ones. They have to look through a giant library of past recipes.

1. The "Keyword Search" (Vector Retrieval - VSR)
This is like using a standard library catalog. You type in a few words, and the computer finds books that sound similar.

  • The Metaphor: If you ask for "Apple," the computer might bring you a book about Apple Inc. (the tech company) and a book about Apple Pie. It sees the word "Apple" and assumes they are related.
  • The Problem: In software, this is "structurally blind." It might miss that one recipe says "Add salt" and another says "Do not add salt" because the words are slightly different, or it might get distracted by irrelevant details. It's fast, but it can be a bit clumsy.

2. The "Expert Librarian" (Knowledge Graph Retrieval - KGR)
This is like having a super-organized librarian who understands how things connect. Instead of just matching words, this librarian builds a map of relationships.

  • The Metaphor: The librarian knows that "Salt" is an ingredient, "Add" is an action, and "Do not" is a negation. If you ask about "Adding salt," the librarian immediately pulls up the recipe that says "Do not add salt" because they understand the logic of the sentence, not just the words.
  • The Benefit: It's much smarter at finding actual conflicts, even if the wording is tricky.

The Experiment: Speed vs. Smarts vs. Green Energy

The researchers set up a race between these two methods using small AI chefs (models with 7–8 billion "brain cells," which is small for AI standards). They measured three things:

  1. Accuracy: Did the AI find the conflict?
  2. Speed: How long did it take?
  3. Green Score: How much electricity and carbon did it use?

They also tested three different ways of talking to the AI (Prompting):

  • Zero-Shot: Just giving the task ("Find the conflict").
  • Few-Shot: Giving the AI a few examples first ("Here is an example of a conflict...").
  • Chain-of-Thought: Asking the AI to "think out loud" before answering.

The Surprising Results

Here is what they found, translated into everyday terms:

1. The "Smart Librarian" (KGR) Wins on Energy
In most cases, the Knowledge Graph (KGR) method was the clear winner for the environment.

  • Why? Even though building the "map" takes a little effort upfront, it helps the AI chef skip the wrong books entirely. It filters out 50% of the unnecessary work before the AI even starts thinking.
  • The Result: By using KGR, they saved about 75% of the energy and 80% of the carbon emissions compared to the standard "Keyword Search" (VSR), while still finding almost all the conflicts. It's like taking a shortcut that saves you a full tank of gas.

2. The "Keyword Search" (VSR) Only Wins in Huge Libraries
The only time the standard search was better was in the biggest dataset (IBM-UAV), which is like a library with millions of books. In that massive crowd, the "Keyword Search" was slightly faster and used less energy. But for normal-sized projects, the "Smart Librarian" was far superior.

3. Talking to the AI Matters (Prompting)

  • Zero-Shot (Just the task): This was the most energy-efficient way to talk to the AI. It was fast and clean.
  • Few-Shot (Giving examples): This doubled the amount of text the AI had to read, using more energy without always getting better results. It's like reading a whole textbook just to answer one question.
  • Chain-of-Thought (Thinking out loud): This helped the AI get smarter (better accuracy) but made it work much harder, burning more energy.

The Big Takeaway

The paper concludes that to make software development green and sustainable, we shouldn't just rely on bigger, hungrier AI models. Instead, we should:

  1. Use Smaller Models: Switch from the "gas-guzzling trucks" (LLMs) to "hybrid cars" (SLMs).
  2. Organize First: Use a Knowledge Graph (the Smart Librarian) to organize information and filter out the noise before the AI starts working.
  3. Keep it Simple: Don't over-complicate the instructions (prompts) to the AI.

The Final Analogy:
Imagine you need to find a specific needle in a haystack.

  • The Old Way: Bring in a giant, hungry robot (LLM) to eat the whole haystack to find the needle. It gets the job done, but it eats a lot of fuel.
  • The New Way (This Paper): Use a magnet (Knowledge Graph) to pull out all the metal junk first, leaving you with a tiny pile of hay. Then, use a small, efficient robot (SLM) to find the needle in that tiny pile.
  • The Result: You find the needle just as fast, but you used 80% less fuel and saved the environment.

This research provides a blueprint for building software tools that are not only smart but also kind to our planet.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →