## 5 Implementation and Results
It then retrieves a specified number (N) of vectors based on both dense and sparse vector matching. ```
1:\(P\): a list of parts
2:\(V\): a list of vector embeddings
3:procedureGenerateEmbeddings(\(P\), \(V\))
4:\(model\gets all\_MiniLM\_L6\_v2\)
5:foreach item \(i\) in \(P\)do
6:\(v_{i}\gets model\_get\_embedding(i)\)
7:\(V\gets v_{i}\)
8:endfor
9:return \(V\)
10:endprocedure
```  
**Algorithm 2** Convert text to vector embeddings  
These retrieved vectors undergo a secondary vector search to refine results based on specific characteristics such as voltage, amperage, and product availability. Due to LLM token limitations, the program may need to filter and select only a subset of these vectors; in this case, five vectors are chosen to be sent to the LLM. The second vector search uses a library called Faiss, which is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size [35]. The steps of converting a user query and performing the multi-step vector search are depicted in Figure 8. The figure contains the experiment example discussed in this experiment section. The selected results are then passed through an encryption module, which encrypts any predefined sensitive information. The ROT13 is used for this purpose with predefined sensitive information such as customer names, proprietary product names, and any contact information. The sensitive information can vary from application to application based on how this main framework and other tools are utilized. Figure 9 depicts using ROT13 with the selected parts and parts data. Figure 7: Training an embedding model. We then present an experimental example to demonstrate the process of part retrieval within the proposed system. The vector search output, shown in Table 2, reflects the system's ability to identify similar parts available in inventory that align with the specified characteristics of a given part number and description, using Algorithm 3. For this example, the input requested parts that matched a specified fuse type, _FLNR015_, 'with characteristics' _Fuse_, _Delay_, _250 VAC_, _15A_, _200 kA_.' The result table shows the first five results of the vector search with the highest similarity scores. These results can now be sent to the LLM for reasoning. Figure 8: Flow of the steps from a user query to LLM response. Figure 9: Using ROT13 to scramble customer names. The system is configured to apply characteristic-specific matching rules, such as avoiding undersized fuses unless explicitly requested by the user. To achieve this functionality, the embedding model is trained and deployed alongside a powerful LLM, such as GPT-4, providing a robust combination for effective part retrieval. Assessing the accuracy of an LLM-based software application is inherently challenging, due to the lack of universally perfect evaluation methods. However, actively analyzing the system's input and output using a curated dataset can provide valuable insights into its effectiveness and accuracy. In this application, a dataset of Question-and-Answer pairs was generated using a process inspired by the principles of LLM distillation [36]. Distillation is a widely used method in machine learning, particularly in the context of LLMs, where a larger, more powerful model (the \"teacher\") is used to train a smaller, more efficient model (the \"student\"). The teacher model generates extensive training data, such as Question-and-Answer pairs or other forms of structured outputs, which capture its advanced reasoning, knowledge, and decision-making capabilities. This generated data serves as a simplified and targeted representation of the teacher model's understanding, allowing the student model to learn from it. The distillation transfers knowledge from the teacher to the student and enables the creation of domain-specific models that are faster, more resource-efficient, and tailored to specific applications.