Skip to content

Commit

Permalink
Add small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brandenchan committed Sep 15, 2021
1 parent c71e065 commit 28137bc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
5 changes: 5 additions & 0 deletions docs/latest/guides/chatbots.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ class ActionHaystack(Action):

return []
```
You will also want to declare this new action in the `domain.yml` file:
```
actions:
- call_haystack
```

## Running the Chatbot

Expand Down
9 changes: 6 additions & 3 deletions docs/latest/guides/pipelines.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,14 @@ NewNode = CustomNode()

## Decision nodes

You can add decision nodes where only one "branch" is executed afterwards. This allows, for example, to classify an incoming query and depending on the result routing it to different modules:
You can add decision nodes where only one "branch" is executed afterwards.
This allows, for example, to classify an incoming query and depending on the result routing it to different modules.
To find a ready-made example of a decision node, have a look at [the page](/usage/query-classifier) about the `QueryClassifier`.

![image](https://user-images.githubusercontent.com/1563902/102452199-41229b80-403a-11eb-9365-7038697e7c3e.png)

If you'd like to define our own, you'll need to create a class that looks something like this:

```python
class QueryClassifier():
outgoing_edges = 2
Expand Down Expand Up @@ -280,8 +285,6 @@ res = doc_pipe.run(query="How can I change my address?", top_k_retriever=3)

```

We plan many more features around the new pipelines including parallelized execution, distributed execution, dry runs - so stay tuned!

<div style={{ marginBottom: "3rem" }} />

## Example: Multiple retrievers
Expand Down
22 changes: 15 additions & 7 deletions docs/latest/guides/preprocessing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ Haystack includes a suite of tools to:
- normalize white space
- split text into smaller pieces to optimize retrieval

Check out our [preprocessing tutorial](/tutorials/train-dpr) if you'd like to start working with code examples already!

These data preprocessing steps can have a big impact on the systems performance
and effective handling of data is key to getting the most out of Haystack.

The Document Store expects its inputs to come in the following format.
<div className="max-w-xl bg-yellow-light-theme border-l-8 border-yellow-dark-theme px-6 pt-6 pb-4 my-4 rounded-md dark:bg-yellow-900">

Check out our [preprocessing tutorial](/tutorials/train-dpr) if you'd like to start working with code examples already!

</div>

## Document Format

The DocumentStore expects its inputs to come in the following format.
The sections below will show you all the tools you'll need to ready your data for storing.

```python
Expand Down Expand Up @@ -91,10 +97,12 @@ See the [API documentation](https://haystack.deepset.ai/reference/crawler) for m
```python
from haystack.connector import Crawler

crawler = Crawler()
docs = crawler.crawl(urls=["https://haystack.deepset.ai/overview/get-started"],
output_dir="crawled_files",
filter_urls= ["haystack\.deepset\.ai\/docs\/"])
crawler = Crawler(output_dir="crawled_files")
docs = crawler.crawl(
urls=["https://haystack.deepset.ai/overview/get-started"],
filter_urls=["haystack"],
crawler_depth=1
)
```

<div style={{ marginBottom: "3rem" }} />
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/latest/guides/retriever.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ from haystack.pipeline import ExtractiveQAPipeline
document_store = ElasticsearchDocumentStore(similarity="cosine")
...
retriever = EmbeddingRetriever(document_store=document_store,
embedding_model="deepset/sentence_bert")
embedding_model="sentence-transformers/all-MiniLM-L6-v2")
...
p = ExtractiveQAPipeline(reader, retriever)
```
Expand Down

0 comments on commit 28137bc

Please sign in to comment.