
Architecture

- Data ingestion and embedding: Product feedback is ingested from a variety of sources. The
ingest_zendesk_ticketsDAG extracts feedback from Zendesk tickets stored in Snowflake, theingest_data_apisDAG extracts feedback from the GitHub and StackOverflow APIs, as well as from local files containing G2 reviews. - Product/feature tagging: Using OpenAI, the feedback is tagged with the relevant product or feature.
- Create feedback summaries and insights: All feedback relating to one product/feature is aggregated and summarized using GPT-4o. The summaries are posted to a Slack channel.
- Executive summary: A final DAG aggregates all product summaries and insights into an executive summary that is posted to a Slack channel.
Airflow features
The DAGs that power the batch inference pipelines highlight several key Airflow best practices and features:- Dynamic task mapping: Dynamic task mapping is used extensively to parallelize tasks throughout the pipeline. For example, feedback summarization and insight generation is parallelized to create one dynamically mapped task instance per product tag that is analyzed. Custom map indexing is used to make it easier to find specific summaries in the task logs.
- Object Storage: Interaction with files in object storage is simplified using the experimental Airflow Object Storage API.
- Airflow retries: To protect against transient API failures and rate limits, all tasks are configured to automatically retry after an adjustable delay.
- Advanced data-driven scheduling: The DAGs in this reference architecture run on data-driven schedules, including conditional dataset scheduling.
- Modularization: The
ingest_data_apisDAG serves as an example of a high level of modularization. Task functions are stored in theincludefolder and imported into the DAG file to be used in@taskdecorators. Ingestion sources are defined in a list of configurations with a loop generating one parallel ingestion track per source.