You can collect frequently asked questions (FAQs) in Phoenix by creating a dataset and uploading your questions and responses using the `upload_dataset` method. To retrieve similar questions when a new query comes in, you can use Phoenix's embedding-based retrieval: generate an embedding for the incoming question and compare it to the embeddings in your FAQ dataset to find the most similar ones. If no similar question is found (i.e., the similarity score is below a threshold), you can treat it as a new or different question and optionally add it to your dataset for future retrievals. For code examples, see <https://docs.arize.com/phoenix/datasets-and-experiments/how-to-datasets/creating-datasets|Creating Datasets> and <https://docs.arize.com/phoenix/learn/retrieval-and-infrences/retrieval-with-embeddings#P%3A5|Retrieval with Embeddings>.
Would you like a step-by-step code example for this workflow?
Sources:
- <https://docs.arize.com/phoenix/learn/retrieval-and-infrences/retrieval-with-embeddings#P%3A5|Retrieval with Embeddings>