On Using Information Retrieval to Recommend Machine Learning Good Practices for Software Engineers

Laura Cabra-Acela, Anamaria Mojica-Hanke, Mario Linares-Vásquez, Steffen Herbold

TL;DR

Researchers have introduced Idaka, a research prototype designed to help software engineers navigate the overwhelming world of Machine Learning (ML) best practices. By offering both a traditional Information Retrieval (IR) search engine and a Large Language Model (LLM) interface, Idaka allows developers to find context-specific guidance while enabling researchers to compare how these two technologies perform in recommending technical "good practices."

What Problem Does This Paper Address?

Building ML-enabled systems is fundamentally different from traditional software engineering. It involves unique challenges in data collection, model training, and monitoring that often lead to "technical debt" or system failure if not handled correctly.

While guidelines for ML best practices exist, they are scattered across "white literature" (academic papers) and "gray literature" (blogs, Q&A sites like Stack Overflow). For a non-expert, this volume of information is overwhelming. Current catalogs are often static lists that require significant up-front effort to read. The authors address this by asking: How can we build a recommender system that gives developers the right ML advice exactly when they need it?

Methods

The authors developed Idaka, which employs a two-pronged approach to retrieving ML practices:

  1. The IR Engine (BM25): This is a "classical" retrieval approach. The system pre-processes a curated corpus (removing stop words, stemming, and expanding synonyms) and uses the Okapi BM25 algorithm to rank the relevance of documents based on the user's query.
  2. The Generative Model (Alpaca): Idaka integrates Alpaca (a fine-tuned version of Meta’s LLaMA 7B). Because Alpaca wasn't originally trained specifically to list ML practices, the authors used prompt engineering to force the model to provide structured responses (a practice name plus a description) that match the format of the IR engine.
  3. Systematic Categorization: To make the data browsable, they mapped practices to a nine-stage ML workflow (e.g., data cleaning, feature engineering, model evaluation) originally proposed by Microsoft researchers.

The tool is built on a modern stack: React.js for the front end, Node.js/Express for the back end, and Python for the IR logic.

Datasets

The researchers created a specialized corpus to seed the IR engine:

  • Size: 150 distinct English sentences describing ML practices.
  • Sources:
    • Stack Exchange: Practices were extracted from ML-related posts using an open-coding process and validated by ML experts.
  • Google’s "People + AI Guidebook": Manually extracted practices including titles, summaries, and descriptions.
  • Availability: The dataset and the tool's source code are publicly available on GitHub and archived for long-term research.

Key Insights and Ideas

  • The "Hybrid" Value: The most interesting aspect of Idaka isn't just that it finds practices, but that it serves as a testbed. By providing both IR and LLM results in the same UI, it allows researchers to conduct comparative studies on which method provides more "useful" or "trustworthy" advice to developers.
  • Structure via Prompting: A key challenge with LLMs is their tendency to be verbose or unstructured. The authors show that by prepending a specific instruction ("Give me an enumerated list... with a description"), they can "tame" a general-purpose model to behave like a specialized recommendation engine.
  • Context is King: Rather than just searching keywords, Idaka allows users to filter by specific ML pipeline stages (like "Data Labeling" or "Model Monitoring"), recognizing that a developer's needs change depending on where they are in the project lifecycle.

Key Results

As a "Tool/New Ideas" paper, the focus is on the implementation and availability of the platform rather than a large-scale user study:

  • Functional Prototype: The authors successfully integrated a local LLM (via the Dalai API) with a custom IR engine into a single web interface.
  • Homogenized Output: The system successfully presents results from two very different back-ends in a unified format, which is critical for reducing bias in future comparative user studies.
  • Open Science: The tool is fully open-sourced with an MIT license, providing a foundation for the community to extend the corpus of ML practices.

Limitations and Future Work

  • Corpus Size: 150 practices is a strong start, but the authors acknowledge the need to systematically expand this by mining more literature.
  • Language Nuances: The current IR engine struggles with intrinsic language issues like polysemy (words with multiple meanings) and typos.
  • LLM Performance: Running LLMs locally (like Alpaca) requires significant infrastructure to ensure fast response times for a smooth user experience.
  • Evaluation: The next major step is conducting user studies to determine which retrieval method developers actually prefer and which leads to better software outcomes.

Summary updated

BibTeX
@inproceedings{cabraacela2023using,
  author = {Laura Cabra-Acela and Anamaria Mojica-Hanke and Mario Linares-Vásquez and Steffen Herbold},
  title = {{On Using Information Retrieval to Recommend Machine Learning Good Practices for Software Engineers}},
  booktitle = {Esec/sigsoft fse},
  year = {2023},
  doi = {10.1145/3611643.3613093},
}
Figure