question-answering.mdx 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ---
  2. title: '❓ Question Answering'
  3. ---
  4. Utilizing large language models (LLMs) for question answering is a transformative application, bringing significant benefits to various real-world situations. Embedchain extensively supports tasks related to question answering, including summarization, content creation, language translation, and data analysis. The versatility of question answering with LLMs enables solutions for numerous practical applications such as:
  5. - **Educational Aid**: Enhancing learning experiences and aiding with homework
  6. - **Customer Support**: Addressing and resolving customer queries efficiently
  7. - **Research Assistance**: Facilitating academic and professional research endeavors
  8. - **Healthcare Information**: Providing fundamental medical knowledge
  9. - **Technical Support**: Resolving technology-related inquiries
  10. - **Legal Information**: Offering basic legal advice and information
  11. - **Business Insights**: Delivering market analysis and strategic business advice
  12. - **Language Learning** Assistance: Aiding in understanding and translating languages
  13. - **Travel Guidance**: Supplying information on travel and hospitality
  14. - **Content Development**: Assisting authors and creators with research and idea generation
  15. ## Example: Build a Q&A System with Embedchain for Next.JS
  16. Quickly create a RAG pipeline to answer queries about the [Next.JS Framework](https://nextjs.org/) using Embedchain tools.
  17. ### Step 1: Set Up Your RAG Pipeline
  18. First, let's create your RAG pipeline. Open your Python environment and enter:
  19. ```python Create pipeline
  20. from embedchain import App
  21. app = App()
  22. ```
  23. This initializes your application.
  24. ### Step 2: Populate Your Pipeline with Data
  25. Now, let's add data to your pipeline. We'll include the Next.JS website and its documentation:
  26. ```python Ingest data sources
  27. # Add Next.JS Website and docs
  28. app.add("https://nextjs.org/sitemap.xml", data_type="sitemap")
  29. # Add Next.JS Forum data
  30. app.add("https://nextjs-forum.com/sitemap.xml", data_type="sitemap")
  31. ```
  32. This step incorporates over **15K pages** from the Next.JS website and forum into your pipeline. For more data source options, check the [Embedchain data sources overview](/components/data-sources/overview).
  33. ### Step 3: Local Testing of Your Pipeline
  34. Test the pipeline on your local machine:
  35. ```python Query App
  36. app.query("Summarize the features of Next.js 14?")
  37. ```
  38. Run this query to see how your pipeline responds with information about Next.js 14.
  39. ### (Optional) Step 4: Deploying Your RAG Pipeline
  40. Want to go live? Deploy your pipeline with these options:
  41. - Deploy on the Embedchain Platform
  42. - Self-host on your preferred cloud provider
  43. For detailed deployment instructions, follow these guides:
  44. - [Deploying on Embedchain Platform](/get-started/deployment#deploy-on-embedchain-platform)
  45. - [Self-hosting Guide](/get-started/deployment#self-hosting)
  46. ## Need help?
  47. If you are looking to configure the RAG pipeline further, feel free to checkout the [API reference](/api-reference/pipeline/query).
  48. In case you run into issues, feel free to contact us via any of the following methods:
  49. <Snippet file="get-help.mdx" />