This n8n workflow streamlines the process of extracting, vectorizing, and querying golf rules documents to facilitate intelligent, retrieval-augmented Q&A interactions. It downloads a PDF containing golf rules, extracts and splits the rules into individual sections, and uses OpenAI embeddings to convert these sections into vector representations. The vectors are stored in a Supabase database with metadata, enabling efficient similarity searches.
Using chat triggers and language models like GPT-4, the workflow can answer specific golf rule questions by retrieving relevant documents from the vector store. It employs re-ranking with Cohere to enhance answer relevance, ensuring users receive accurate, contextually rich responses based on their queries.
This setup is ideal for creating an AI-powered golf rules assistant or any domain where large documents or rulebooks need to be queried dynamically, supporting sports education, rule enforcement, or customer support scenarios.
