diff --git a/examples/README.md b/examples/README.md index c51879a0f..a6eed2ade 100644 --- a/examples/README.md +++ b/examples/README.md @@ -4,6 +4,34 @@ This folder contains educational materials and tutorials to help developers get ## Contents +### `intro_to_airweave.ipynb` +An interactive Jupyter notebook that introduces the core Airweave workflow: + +1. **Client Setup** - Installing the SDK and initializing the client +2. **Collections** - Creating a collection to organize data sources +3. **Source Connections** - Connecting a data source (Stripe example) +4. **Search** - Performing natural language searches across connected sources + +This is the best starting point for new users who prefer hands-on exploration. + +### `search_concepts.ipynb` +A comprehensive Jupyter notebook with **14 practical examples** covering all major search features: + +1. **Basic Search** - Simple queries with default settings +2. **Query Expansion** - AI-generated query variations for better recall +3. **Search Methods** - Hybrid vs Neural search approaches +4. **Filtering** - Structured filters by source, date range, and exclusions +5. **Query Interpretation** - Natural language filtering (Beta) +6. **Temporal Relevance** - Boosting recent content with recency bias +7. **Pagination** - Handling large result sets with limit/offset +8. **Score Filtering** - High-confidence results only +9. **AI Reranking** - Improving result quality with AI reordering +10. **AI Answer Generation** - Getting synthesized responses +11. **Complete Example** - Combining all features together + +### `webhook-demo/` +A minimal FastAPI app that receives Airweave webhook events and streams them to a browser UI in real time via WebSocket. See [webhook-demo/README.md](webhook-demo/README.md) for details. + ### `quickstart_tutorial.py` A comprehensive Python script that walks through the complete Airweave quickstart process: diff --git a/examples/intro_to_airweave.ipynb b/examples/intro_to_airweave.ipynb index cded6814f..acd42a28b 100644 --- a/examples/intro_to_airweave.ipynb +++ b/examples/intro_to_airweave.ipynb @@ -109,7 +109,7 @@ "that includes data from Stripe, HubSpot, and your internal Postgres database, or a \"Productivity Tools\" collection \n", "containing your Notion, Linear, and Microsoft Teams accounts.\n", "\n", - "You are free to add as many or as little sources to a collection as you like. The important thing to remember is that, in Airweave, a collection is what's being searched by an agent.\n", + "You are free to add as many or as few sources to a collection as you like. The important thing to remember is that, in Airweave, a collection is what's being searched by an agent.\n", "\n", "Let's create your first collection:" ] @@ -124,7 +124,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "āœ… Created collection: my-first-collection-ezhgns\n", + "\u2705 Created collection: my-first-collection-ezhgns\n", " Name: My First Collection\n", " ID: YOUR_COLLECTION_ID\n" ] @@ -136,7 +136,7 @@ " name=\"My First Collection\" # Give your collection a descriptive name\n", ")\n", "\n", - "print(f\"āœ… Created collection: {collection.readable_id}\")\n", + "print(f\"\u2705 Created collection: {collection.readable_id}\")\n", "print(f\" Name: {collection.name}\")\n", "print(f\" ID: {collection.id}\")" ] @@ -182,7 +182,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "āœ… Created source connection: My Stripe Connection\n", + "\u2705 Created source connection: My Stripe Connection\n", " Status: active\n", " Type: stripe\n" ] @@ -202,7 +202,7 @@ " }\n", ")\n", "\n", - "print(f\"āœ… Created source connection: {source_connection.name}\")\n", + "print(f\"\u2705 Created source connection: {source_connection.name}\")\n", "print(f\" Status: {source_connection.status}\")\n", "print(f\" Type: {source_connection.short_name}\")" ] @@ -212,7 +212,7 @@ "id": "7275c86a", "metadata": {}, "source": [ - "Once source connection is established, Airweave will automatically:\n", + "Once the source connection is established, Airweave will automatically:\n", "1. Validate the credentials\n", "2. Begin syncing data from Stripe\n", "3. Extract and index relevant entities (customers, payments, invoices, etc.)\n", @@ -256,9 +256,9 @@ "output_type": "stream", "text": [ "\n", - "šŸ” Searching for customer payment information...\n", + "\ud83d\udd0d Searching for customer payment information...\n", "\n", - "šŸ“ Result 1 (Score: 88.83%)\n", + "\ud83d\udccd Result 1 (Score: 88.83%)\n", " Source: stripe | Type: StripePaymentIntentEntity\n", " ID: pi_3Q13xgGm1FpXlyE50uRm1zO2\n", " Amount: 1008\n", @@ -269,7 +269,7 @@ " Customer Id: cus_QpEel2ZOt74xmy\n", "------------------------------------------------------------\n", "\n", - "šŸ“ Result 2 (Score: 51.82%)\n", + "\ud83d\udccd Result 2 (Score: 51.82%)\n", " Source: stripe | Type: StripePaymentIntentEntity\n", " ID: pi_3Q17MZGm1FpXlyE51ZMPa9cr\n", " Amount: 1008\n", @@ -280,7 +280,7 @@ " Customer Id: cus_QpEel2ZOt74xmy\n", "------------------------------------------------------------\n", "\n", - "šŸ“ Result 3 (Score: 47.38%)\n", + "\ud83d\udccd Result 3 (Score: 47.38%)\n", " Source: stripe | Type: StripePaymentIntentEntity\n", " ID: pi_3Q1373Gm1FpXlyE5195Woh3n\n", " Amount: 1008\n", @@ -291,7 +291,7 @@ " Customer Id: cus_QpEel2ZOt74xmy\n", "------------------------------------------------------------\n", "\n", - "šŸ“ Result 4 (Score: 39.98%)\n", + "\ud83d\udccd Result 4 (Score: 39.98%)\n", " Source: stripe | Type: StripePaymentIntentEntity\n", " ID: pi_3Q17TsGm1FpXlyE51wWVduuC\n", " Amount: 1008\n", @@ -302,7 +302,7 @@ " Customer Id: cus_QpEel2ZOt74xmy\n", "------------------------------------------------------------\n", "\n", - "šŸ“ Result 5 (Score: 16.77%)\n", + "\ud83d\udccd Result 5 (Score: 16.77%)\n", " Source: stripe | Type: StripePaymentIntentEntity\n", " ID: pi_3PxrxGGm1FpXlyE50SnwWx4E\n", " Amount: 1005\n", @@ -313,7 +313,7 @@ " Customer Id: cus_QpEel2ZOt74xmy\n", "------------------------------------------------------------\n", "\n", - "šŸ“ Result 6 (Score: 14.32%)\n", + "\ud83d\udccd Result 6 (Score: 14.32%)\n", " Source: stripe | Type: StripePaymentIntentEntity\n", " ID: pi_3PxsZsGm1FpXlyE51G6Hk74K\n", " Amount: 1008\n", @@ -327,7 +327,7 @@ } ], "source": [ - "print(\"\\nšŸ” Searching for customer payment information...\")\n", + "print(\"\\n\ud83d\udd0d Searching for customer payment information...\")\n", "results = client.collections.search(\n", " readable_id=collection.readable_id, query=\"Payment attempts for concert tickets\"\n", ")\n", @@ -342,7 +342,7 @@ " source = payload.get('airweave_system_metadata', {}).get('source_name', 'Unknown')\n", " entity_type = payload.get('airweave_system_metadata', {}).get('entity_type', 'Unknown')\n", " \n", - " print(f\"\\nšŸ“ Result {i} (Score: {score:.2%})\")\n", + " print(f\"\\n\ud83d\udccd Result {i} (Score: {score:.2%})\")\n", " print(f\" Source: {source} | Type: {entity_type}\")\n", " print(f\" ID: {entity_id}\")\n", " \n", @@ -372,13 +372,13 @@ "id": "f7fcaa93", "metadata": {}, "source": [ - "## Congratulations! šŸŽ‰\n", + "## Congratulations! \ud83c\udf89\n", "\n", "You've successfully:\n", - "- āœ… Set up the Airweave Python client\n", - "- āœ… Created a collection\n", - "- āœ… Connected data sources\n", - "- āœ… Performed searches across your data\n", + "- \u2705 Set up the Airweave Python client\n", + "- \u2705 Created a collection\n", + "- \u2705 Connected data sources\n", + "- \u2705 Performed searches across your data\n", "\n", "### What's Next?\n", "\n", @@ -415,4 +415,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file