I have implemented an Oracle APEX application integrated with OpenAI API for SQL query generation based on user prompts. The system uses Oracle ADW metadata for column information and relies on OpenAI for generating SQL queries.
However, for complex questions involving formulas (e.g., "What is the attrition rate for the last 3 months?"), I face challenges as the pipeline does not blend database metadata with OpenAI's knowledge repository seamlessly.
Is it possible to configure Oracle APEX to dynamically integrate both ADW metadata and OpenAI's knowledge, enabling the generation of more accurate queries? If so, could you provide guidance or best practices for implementing such a blended architecture within the APEX platform?