Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the header #396

Merged
merged 3 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ paginatePath = "/"
weight = 7

[[menu.main]]
identifier = 'studio'
name = 'Studio'
url = 'https://landing.deepset.ai/deepset-studio-signup'
identifier = 'deepset'
name = 'deepset'
url = '/'
weight = 8
params = { tag = "New" }

Expand All @@ -130,12 +130,6 @@ paginatePath = "/"
parent = 'overview'
weight = 3

[[menu.main]]
name = 'deepset Careers'
url = "https://www.deepset.ai/jobs"
parent = 'overview'
weight = 4

[[menu.main]]
name = '📚 Tutorials & Walkthroughs'
url = '/tutorials'
Expand Down Expand Up @@ -180,3 +174,22 @@ paginatePath = "/"
parent = 'resources'
weight = 4

# deepset children
[[menu.main]]
name = 'deepset '
url = 'https://www.deepset.ai/'
parent = 'deepset'
weight = 1

[[menu.main]]
name = 'Careers'
url = "https://www.deepset.ai/careers"
parent = 'deepset'
weight = 4

[[menu.main]]
name = 'deepset Studio'
url = 'https://www.deepset.ai/deepset-studio'
parent = 'deepset'
weight = 2
params = { tag = "Sign up" }
18 changes: 9 additions & 9 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ hero:
url: /overview/quick-start/
- buttonText: Get Started with Studio
buttonColor: blue
url: https://landing.deepset.ai/deepset-studio-signup
url: https://www.deepset.ai/deepset-studio

features:
- title: Highly<br> customizable
Expand All @@ -41,7 +41,7 @@ hero:
bulletPoints:
- Drag, drop, and construct Haystack pipelines
- Bring your own files or connect your database
- Deploy on deepset Cloud or export pipelines locally
- Deploy on deepset or export pipelines locally
- Test, debug, and share your prototype
- Free and open to everyone
buttons:
Expand All @@ -51,7 +51,7 @@ hero:

- buttonText: Start building
buttonColor: blue
url: https://landing.deepset.ai/deepset-studio-signup
url: https://www.deepset.ai/deepset-studio

CTA:
link: https://www.deepset.ai/deepset-cloud
Expand Down Expand Up @@ -114,13 +114,13 @@ community:
successMessage: Thanks! You'll soon receive a confirmation email 📧

communityTalks:
- title: "AWS Summit Berlin 2023: Building Generative AI Applications on AWS featuring deepset"
videoId: Hns424sFY7s
- title: "Evaluating AI with Haystack"
videoId: Dy-n_yC3Cto

- title: Building Applications with LLM-Based Agents
videoId: 1NPcnlqPf2U
- title: "Adding Tools to Agentic Pipelines & Other Experimental Features"
videoId: QWx3OzW2Pvo

- title: "Open NLP Meetup #13: Hosting LLM Apps @ Scale with Haystack, Titan ML & Jina AI"
videoId: CWSn-9s955g
- title: "How to Train a DE-licious Embedding Model"
videoId: 3zpv4qpNy8I

---
129 changes: 47 additions & 82 deletions content/overview/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ toc: true
aliases: [get-started]
---

Haystack is an open-source Python framework that helps developers build LLM-powered custom applications. In March 2024, we released Haystack 2.0, a significant update. For more information on Haystack 2.0, you can also read the [announcement post](https://haystack.deepset.ai/blog/haystack-2-release).
Haystack is an open-source AI framework to build custom production-grade LLM applications such as AI agents, powerful RAG applications, and scalable search systems.

## Installation

Expand All @@ -25,34 +25,13 @@ For more details, refer to our documentation.

## Ask Questions to a Webpage

This is a very simple pipeline that can answer questions about the contents of a webpage. It uses GPT-3.5-Turbo with the `OpenAIGenerator`.
This is a very simple pipeline that can answer questions about the contents of a webpage. It uses `gpt-4o-mini` with the `OpenAIGenerator`.

Run the following **Quickstart** or the equivalent **Corresponding Pipeline** below. See the pipeline visualized in **Pipeline Graph**.

{{< tabs totalTabs="3">}}
{{< tabs totalTabs="2">}}

{{< tab tabName="Quickstart: Ready-Made Template" >}}
First, install Haystack:
```bash
pip install haystack-ai trafilatura
```

```python
import os
from haystack import Pipeline, PredefinedPipeline

os.environ["OPENAI_API_KEY"] = "Your OpenAI API Key"

pipeline = Pipeline.from_template(PredefinedPipeline.CHAT_WITH_WEBSITE)
result = pipeline.run({
"fetcher": {"urls": ["https://haystack.deepset.ai/overview/quick-start"]},
"prompt": {"query": "Which components do I need for a RAG pipeline?"}}
)
print(result["llm"]["replies"][0])
```
{{< /tab >}}

{{< tab tabName="Corresponding Pipeline" >}}
{{< tab tabName="Quickstart: Chat with Website Pipeline" >}}
First, install Haystack:
```bash
pip install haystack-ai trafilatura
Expand All @@ -64,23 +43,29 @@ import os
from haystack import Pipeline
from haystack.components.fetchers import LinkContentFetcher
from haystack.components.converters import HTMLToDocument
from haystack.components.builders import PromptBuilder
from haystack.components.generators import OpenAIGenerator
from haystack.components.builders import ChatPromptBuilder
from haystack.components.generators.chat import OpenAIChatGenerator
from haystack.dataclasses import ChatMessage

os.environ["OPENAI_API_KEY"] = "Your OpenAI API Key"

fetcher = LinkContentFetcher()
converter = HTMLToDocument()
prompt_template = """
According to the contents of this website:
{% for document in documents %}
{{document.content}}
{% endfor %}
Answer the given question: {{query}}
Answer:
"""
prompt_builder = PromptBuilder(template=prompt_template)
llm = OpenAIGenerator()
prompt_template = [
ChatMessage.from_user(
"""
According to the contents of this website:
{% for document in documents %}
{{document.content}}
{% endfor %}
Answer the given question: {{query}}
Answer:
"""
)
]

prompt_builder = ChatPromptBuilder(template=prompt_template)
llm = OpenAIChatGenerator()

pipeline = Pipeline()
pipeline.add_component("fetcher", fetcher)
Expand All @@ -95,7 +80,7 @@ pipeline.connect("prompt.prompt", "llm.prompt")
result = pipeline.run({"fetcher": {"urls": ["https://haystack.deepset.ai/overview/quick-start"]},
"prompt": {"query": "Which components do I need for a RAG pipeline?"}})

print(result["llm"]["replies"][0])
print(result["llm"]["replies"][0].text)
```
{{< /tab >}}

Expand All @@ -111,43 +96,15 @@ print(result["llm"]["replies"][0])

## Build Your First RAG Pipeline

To build modern search pipelines with LLMs, you need two things: powerful components and an easy way to put them together. The Haystack pipeline is built for this purpose and enables you to design and scale your interactions with LLMs. Learn how to create pipelines [here](https://docs.haystack.deepset.ai/docs/creating-pipelines).
To build modern LLM-based applications, you need two things: powerful components and an easy way to put them together. The Haystack pipeline is built for this purpose and enables you to design and scale your interactions with LLMs. Learn how to create pipelines [here](https://docs.haystack.deepset.ai/docs/creating-pipelines).

By connecting three components, a [Retriever](https://docs.haystack.deepset.ai/docs/retrievers), a [PromptBuilder](https://docs.haystack.deepset.ai/docs/promptbuilder) and a [Generator](https://docs.haystack.deepset.ai/docs/generators), you can build your first Retrieval Augmented Generation (RAG) pipeline with Haystack.
By connecting three components, a [Retriever](https://docs.haystack.deepset.ai/docs/retrievers), a [ChatPromptBuilder](https://docs.haystack.deepset.ai/docs/chatpromptbuilder) and a [Chat Generator](https://docs.haystack.deepset.ai/docs/generators), you can build your first Retrieval Augmented Generation (RAG) pipeline with Haystack.

Try out how Haystack answers questions about the given documents using the **RAG** approach 👇

{{< tabs totalTabs="3">}}
{{< tabs totalTabs="2">}}

{{< tab tabName="Quickstart: Ready-Made Template" >}}
Install Haystack:

```bash
pip install haystack-ai
```

```python
import os

from haystack import Pipeline, PredefinedPipeline
import urllib.request

os.environ["OPENAI_API_KEY"] = "Your OpenAI API Key"
urllib.request.urlretrieve("https://archive.org/stream/leonardodavinci00brocrich/leonardodavinci00brocrich_djvu.txt",
"davinci.txt")

indexing_pipeline = Pipeline.from_template(PredefinedPipeline.INDEXING)
indexing_pipeline.run(data={"sources": ["davinci.txt"]})

rag_pipeline = Pipeline.from_template(PredefinedPipeline.RAG)

query = "How old was he when he died?"
result = rag_pipeline.run(data={"prompt_builder": {"query":query}, "text_embedder": {"text": query}})
print(result["llm"]["replies"][0])
```
{{< /tab >}}

{{< tab tabName="Corresponding Pipeline" >}}
{{< tab tabName="Basic RAG Pipeline with Indexing" >}}
Install Haystack:

```bash
Expand All @@ -165,7 +122,8 @@ from haystack.components.preprocessors import DocumentCleaner, DocumentSplitter
from haystack.components.embedders import OpenAIDocumentEmbedder, OpenAITextEmbedder
from haystack.components.writers import DocumentWriter
from haystack.components.builders import PromptBuilder
from haystack.components.generators import OpenAIGenerator
from haystack.components.generators.chat import OpenAIChatGenerator
from haystack.dataclasses import ChatMessage

os.environ["OPENAI_API_KEY"] = "Your OpenAI API Key"
urllib.request.urlretrieve("https://archive.org/stream/leonardodavinci00brocrich/leonardodavinci00brocrich_djvu.txt",
Expand Down Expand Up @@ -194,15 +152,21 @@ indexing_pipeline.run(data={"sources": ["davinci.txt"]})

text_embedder = OpenAITextEmbedder()
retriever = InMemoryEmbeddingRetriever(document_store)
template = """Given these documents, answer the question.
Documents:
{% for doc in documents %}
{{ doc.content }}
{% endfor %}
Question: {{query}}
Answer:"""
prompt_builder = PromptBuilder(template=template)
llm = OpenAIGenerator()
prompt_template = [
ChatMessage.from_user(
"""
Given these documents, answer the question.
Documents:
{% for doc in documents %}
{{ doc.content }}
{% endfor %}
Question: {{query}}
Answer:
"""
)
]
prompt_builder = ChatPromptBuilder(template=prompt_template)
llm = OpenAIChatGenerator()

rag_pipeline = Pipeline()
rag_pipeline.add_component("text_embedder", text_embedder)
Expand All @@ -220,7 +184,8 @@ print(result["llm"]["replies"][0])
```
{{< /tab >}}

{{< tab tabName="Pipeline Graph" >}}

{{< tab tabName="Pipeline Graphs" >}}
<div class="row" style="display:flex">
<div class="column" style="margin:15px auto" >
<p>Indexing Pipeline</p>
Expand All @@ -235,6 +200,6 @@ print(result["llm"]["replies"][0])

{{< /tabs >}}

For a hands-on guide on how to build your first RAG Pipeline with Haystack 2.0, see our tutorial.
For a hands-on guide on how to build your first RAG Pipeline with Haystack, see our tutorial.

{{< button url="https://haystack.deepset.ai/tutorials/27_first_rag_pipeline" text="Tutorial: Creating a RAG Pipeline" color="green">}}
24 changes: 21 additions & 3 deletions content/pages/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ aliases: [/community/join]
# Hero
hero:
headline: Join the Haystack Community
text: Haystack is fully open source. Our community is made up of NLP researchers, enthusiasts, engineers and people who are interested in semantic search. Join us!
text: Haystack is fully open source. Our community is made up of AI Engineers, NLP researchers, data scientists, enthusiasts and people who are interested in building with LLMs. Join us!

# Discord / newsletter
community:
Expand Down Expand Up @@ -74,15 +74,33 @@ hero:
# url: https://hubs.li/Q01Xr4GB0
# buttonText: Register

eventsSection:
anchor: events
title: Upcoming Events
text: Join us in our upcoming in-person or online events 💙
buttonText: See the upcoming events
url: https://lu.ma/haystack

livestreamsSection:
anchor: livestreams
title: Haystack Livestreams
text: Learn about the latest features of Haystack, new LLMs, open source tools, and different architectures for various use cases in our livestreams.
buttonText: Check all past livestreams
url: https://www.youtube.com/@haystack_ai
videos:
- Dy-n_yC3Cto
- QWx3OzW2Pvo
- 3zpv4qpNy8I
- F5VQvf5tx_g

# Open NLP Meetup section
meetupSection:
anchor: meetup
title: The Open NLP Meetup
text: The Open NLP Group is more than just high-quality talks from industry and research perspectives. It’s also the place to meet other NLP enthusiasts and to discuss and share ideas on how to integrate NLP techniques into your applications. We get together every three months and we welcome people from all kinds of backgrounds to join.
buttonText: Join Meetup
buttonText: Join the Open NLP Group
url: https://www.meetup.com/open-nlp-meetup/
videos:
- XlJQkvk7hww
- bQmd80BGGsw
- 62jfDcCuJbY
---
6 changes: 6 additions & 0 deletions themes/haystack/assets/sass/components/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@
visibility: hidden;
}
}

// dropdown menu tags
.menu-item-tag {
top: -1rem;
right: -1rem;
}
}

// Show dropdown menu on hover
Expand Down
Loading