-
Notifications
You must be signed in to change notification settings - Fork 5
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
docs: how-to on default configuration for Ragbits #359
base: main
Are you sure you want to change the base?
docs: how-to on default configuration for Ragbits #359
Conversation
Trivy scanning results. |
Code Coverage Summary
Diff against main
Results for commit: 7fd16de Minimum allowed coverage is ♻️ This comment has been updated with latest results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way you use 'default' (component/configuration) is not clear for me. I haven't comment all the places I have problem with understanding it. But as I am not very good in reading instructions treat my comments as suggestions :)
docs/cli/main.md
Outdated
@@ -2,6 +2,8 @@ | |||
|
|||
Ragbits comes with a command line interface (CLI) that provides a number of commands for working with the Ragbits platform. It can be accessed by running the `ragbits` command in your terminal. | |||
|
|||
Functions that operate on Ragbits components (like [`ragbits vector-store`](#ragbits-vector-store)) try to use default values for the components if they are not provided explicitly. To learn how to set these defaults in your project, see the [How to Set Default Configuration for Components](../how-to/core/configuration.md) guide. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First sentence is not clear for me, maybe:
Whenever possible, functions that operate on Ragbits components (such as the Ragbits vector store) should be used with their default values
or:
With functions/In the functions ....
docs/how-to/core/configuration.md
Outdated
``` | ||
|
||
#### DocumentSearch Specific Behavior | ||
While you can provide `DocumentSearch` with a default configuration in the same way as other components (by setting the `document_search` key in the YAML configuration file), there is also a shortcut. If you don't provide a default configuration for `DocumentSearch` explicitly, it will look for the default configuration of all the components it uses (like `vector_store`, `provider`, `rephraser`, `reranker`, etc.) and use them as its own default configuration. This way, you don't have to configure those components twice (once for `DocumentSearch` and once for the component itself). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't provide a default configuration for DocumentSearch
explicitly, it will look...
It is not clear what is "it". Maybe: program, system. Or maybe:
The default configuration of all the components will be used.
# How to Set Default Configuration for Components | ||
|
||
## Introduction | ||
When you use Ragbits in your project, you can set default configurations for different types of components (like embedders, vector stores, LLMs, etc.) in the project configuration. Typically, there are many different implementations for each type of component, and each implementation has its own configurations. Ragbits allows you to choose the implementation you want to use by default for each type of component and set configurations to be used along with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ragbits allows you to choose the implementation you want to use by default ...
I think it will be more clear without 'by default'. For me by default means that it is set in the system and I don't have to do anything to set it.
docs/how-to/core/configuration.md
Outdated
When you use Ragbits in your project, you can set default configurations for different types of components (like embedders, vector stores, LLMs, etc.) in the project configuration. Typically, there are many different implementations for each type of component, and each implementation has its own configurations. Ragbits allows you to choose the implementation you want to use by default for each type of component and set configurations to be used along with it. | ||
|
||
## Using the Default Components | ||
Your default configuration is used automatically by the [Ragbits CLI](../../cli/main.md). The `ragbits` commands that work on components (like [`ragbits vector-store`](../../cli/main.md#ragbits-vector-store), [`ragbits document-search`](../../cli/main.md#ragbits-document-search), etc.) will use the default component configuration unless instructed otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here also I would skip deafult in 'Your default configuration'
Your configuration ....
docs/how-to/core/configuration.md
Outdated
|
||
You can also use the default configuration in your code by instantiating the component using the `subclass_from_defaults()` factory method of [the base class of the given component type](#list-of-component-types). This method will create an instance of the default implementation of the component using the default configuration. | ||
|
||
For example, this will create an instance of the default vector store implementation with the default configuration (as long as you have set the default vector store in the project configuration): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about an example how to set default vector store in project configuration
docs/how-to/core/configuration.md
Outdated
Note that `VectorStore` itself is an abstract class, so the instance created by `subclass_from_defaults()` will be an instance of one of the concrete subclasses of `VectorStore` that you have set as the default in the project configuration. | ||
|
||
## Setting the Default Configuration | ||
You can specify the default configuration for components in two different ways: either by providing a factory function that creates the default instance of the component or by providing a YAML configuration file that contains the default configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"You can specify the default configuration for components"
Maybe: "You can specify the your own configuration of the components"
default configuration I undesratnd as the one which doesn;t need to be set. For example for Vectore Store we have defined VectorStoreOptions k=5 and max_distance=None and it is default configuration. I can use this one or set my own parameters
No description provided.