4. A Code Generation Tool for FABRIC

Unlike most RAG code-generation studies noted above, our FABRIC code generation tool is deliberately simple to deploy. Although the quality of input data is always a factor, as will be discussed in a later section, our tool does not require time-consuming manual tagging of input data. Moreover, the whole pipeline can be implemented using small local LLMs and open-source software and libraries.

../_images/RAG_architecture.png

Fig. 2 RAG Architecture

  1. Chroma vector database is created with current Jupyter examples that are used as a reference.

  2. User asks for a notebook to be generated.

  3. User’s query is sent to the vector database.

  4. Small number of documents that are considered relevant to the user’s query are returned.

  5. User’s query along with the retrieved documents are sent to an LLM running through Ollama.

  6. (ONLY IF using GPT-4o-mini) Ollama sends the query along with the retrieved documents to OpenAI using a stored key.

  7. (ONLY IF using GPT-4o-mini) OpenAI sends response back.

  8. LLM’s response (raw) is sent back.

  9. LLM’s response is parsed and returned to the user via GUI.

Input (GUI) shows how the user can enter a query, choose LLM, its temperature setting, whether to use RAG, and how many documents to retrieve. The generated code is returned as shown in Output (GUI).

../_images/GUI_input.png

Fig. 3 Input (GUI)

../_images/GUI_input.png

Fig. 4 Output (GUI)