Draft
LLM Application extension pages: 1.0.1 update
Last modified by gabrielc on 2026/11/24 10:06
Preview the image
Updates for LLM 1.0.1.
-
gabrielc created this Change Request with changes for LLM Application
26 minutes ago
-
gabrielc added a new change for LLM Chat WebJar
26 minutes ago
-
gabrielc added a new change for Index for the LLM Application
26 minutes ago
-
gabrielc added a new change for LLM Chat WebJar
21 minutes ago
-
gabrielc added a new change for LLM Chat WebJar
6 minutes ago
All changes
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,0 +1,1 @@ 1 +LLM Application - Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. ppantiru1 +xwiki:XWiki.gabrielc - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en
- ExtensionCode.ExtensionClass[0]
-
- Description
-
... ... @@ -51,7 +51,7 @@ 51 51 {{version since="0.2" product="LLM Application"}} 52 52 There is no more button except the submit button, other one have been simplified in a dropdown menu like this: 53 53 {{image reference="BurgerView.png"/}} 54 -This menu has a "New Conversation" button, that just reset everything in the window (erase the previous message + the context in the background). Then at the bottom there is one new feature : Advanced Settings. Advanced Settings allow you to do 2 things, change temperature (i.e, the level of creativity of the models) and edit system prompt on the go. You can see the interface right below. 54 +This menu has a "New Conversation" button, that just reset everything in the window (erase the previous message + the context in the background). Then at the bottom there is one new feature : Advanced Settings. Advanced Settings allow you to do 2 things, change temperature (i.e, the level of creativity of the models) and edit system prompt on the go. {{version since="1.0.1" product="LLM Application"}}Leave the temperature empty to use the default of the model provider.{{/version}} You can see the interface right below. 55 55 {{image reference="settingsView.png"/}} 56 56 {{/version}} 57 57 ... ... @@ -87,7 +87,7 @@ 87 87 * {{version since="0.2.1" product="LLM Application"}} Active: if checked the prompt will be displayed in the Quick Task menu. Else the prompt is not displayed in the Quick Task.{{/version}} 88 88 * System prompt: The system prompt is the initial set of instructions that sets the boundaries for an AI conversation. What rules the assistant should follow, what topics to avoid, how the assistant should format responses, and more. 89 89 * User prompt: A text or instruction provided to guide the model's response generation. It sets the context and provides guidelines for producing relevant output. 90 -* Temperature: Number between 0 and 2 describing the creativity of the model for its answer(0 being deterministic and 2 most creative). 90 +* Temperature: Number between 0 and 2 describing the creativity of the model for its answer(0 being deterministic and 2 most creative). {{version since="1.0.1" product="LLM Application"}}Leave it empty to use the default of the model provider. The prompts shipped with the application have no temperature.{{/version}} 91 91 * {{version since="0.2.1" product="LLM Application"}} Default: if checked the prompt will be used as default.{{/version}} 92 92 * Database list: not displayed in the database view, this has no purpose for user. 93 93 ... ... @@ -103,12 +103,8 @@ 103 103 104 104 == URL prefix == 105 105 106 -The URL prefix is the placewhereyouwilldefine theprefixURLtoreach the finalURI (/modelsand/chat/completions).It'sreally importantto haveaURLrespectingthe following rules:106 +The URL prefix is the base URL of the API of the server, for example "https:~/~/api.openai.com/v1/" for the OpenAI models. The application appends the endpoint paths to it: with the prefix "https:~/~/example.com/v1", it sends its requests to "https:~/~/example.com/v1/chat/completions" and "https:~/~/example.com/v1/embeddings", so these endpoints have to exist. {{version since="1.0.1" product="LLM Application"}}The final "/" of the prefix is optional.{{/version}} 107 107 108 -* It should respect this template: "http:~/~/.../" (or "https:~/~/.../"), where "..." has to be replaced with your real address. 109 -** To use the OpenAI models you should use the URL prefix "https:~/~/api.openai.com/v1/" for example. 110 -* It has to end with a "/", for request to be valid. 111 -* The endpoint "http:~/~/.../models" and "http:~/~/.../chat/completions" has to exist, else it can't work. 112 112 * {{version since="0.5" product="LLM Application"}}Leave the URL empty to create a server entry for running a model on the CPU of the XWiki server. Currently, this is only supported for embedding models on Linux with x86-64 CPU.{{/version}}((( 113 113 114 114 ))) ... ... @@ -149,7 +149,7 @@ 149 149 * **Allow guests to access the model**: Whether guest users can use this model. Use this carefully as this might incur high costs if you don't pay attention. 150 150 * **Group**: The user groups that are allowed to use this model. Note that for embedding models it is important to allow both the users that are creating documents in the [[Index for the LLM Application>>Extension.LLM.Index for the LLM Application.WebHome]] and the users who perform queries by using the chat interface. 151 151 * **Filters**: Provides configuration for various filters that can be provided by extensions, extensions can add further filters as documented in the [[LLM Models API>>Extension.LLM.LLM API.WebHome]] documentation. 152 -** **Context**: when the [[Index for the LLM Application>>Extension.LLM.Index for the LLM Application.WebHome]] is installed, the context can be configured. The current chat message is embedded using the embedding model configured for the selected collections and the most similar content chunks from these collections are provided to the LLM as context. This allows the LLM to more accurately answer user requests based on relevant content from the collections. While this can reduce hallucinations and wrong responses, the LLM could still make up facts including references to context that doesn't actually exist, and even when the provided context is relevant it might ignore or misunderstand it and could still provide wrong answers. {{version since="0.7" product="LLM Application"}}In addition to the embedding-based similarity search, a regular keyword-based search is executed. The results of both searches are combined. The number of results can be configured individually for both.{{/version}} 148 +** **Context**: when the [[Index for the LLM Application>>Extension.LLM.Index for the LLM Application.WebHome]] is installed, the context can be configured. The current chat message is embedded using the embedding model configured for the selected collections and the most similar content chunks from these collections are provided to the LLM as context. This allows the LLM to more accurately answer user requests based on relevant content from the collections. While this can reduce hallucinations and wrong responses, the LLM could still make up facts including references to context that doesn't actually exist, and even when the provided context is relevant it might ignore or misunderstand it and could still provide wrong answers. {{version since="0.7" product="LLM Application"}}In addition to the embedding-based similarity search, a regular keyword-based search is executed. The results of both searches are combined. The number of results can be configured individually for both.{{/version}} {{version since="1.0.1" product="LLM Application"}}The combined results are ordered by their rank in each search (Reciprocal Rank Fusion), so a strong semantic match can rank above the keyword matches.{{/version}} 153 153 *** **Collections**: the collections that shall be queried, empty if the request shouldn't be augmented with context. 154 154 *** **Search results limit**: how many results shall be considered. Note that a result is just a single chunk, not a whole document. There could be several chunks of the same document. 155 155 *** {{version since="0.7" product="LLM Application"}}**Keyword search results limit (number)** The Maximum number of results returned by the keyword search can now be configured in addition to the **Similarity search results limit (number)**.{{/version}}
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. ppantiru1 +xwiki:XWiki.gabrielc - Content
-
... ... @@ -1,0 +1,3 @@ 1 + 2 + 3 +
- chatui-settings.png
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. ppantiru1 +xwiki:XWiki.gabrielc - Size
-
... ... @@ -1,1 +1,1 @@ 1 - 24.4KB1 +10.3 KB - Content
- ExtensionCode.ExtensionClass[0]
-
- Description
-
... ... @@ -36,8 +36,6 @@ 36 36 - //baseURL//: The base URL of the XWiki AI Chat API. Defaults to //"http://localhost:8080/xwiki"//. 37 37 - //wikiName//: The name of the wiki. Default is //'xwiki'//. 38 38 - //apiKey//: The API key for authentication. Default is an empty string. 39 -- //temperature//: The temperature value for generating chat completions. Default is //1//. 40 -- //stream//: A boolean indicating whether to use streaming mode. Default is //false//. 41 41 - //chatUISettings//: An array of available chat UI settings. Available values are: "server-address","temperature","model" and "stream" 42 42 43 43 === Methods === ... ... @@ -63,7 +63,7 @@ 63 63 {{/code}} 64 64 65 65 - //model//: The model to use for generating chat completions. 66 -- //temperature//: The randomness of the generated completions, usuallybetween0and2.64 +- //temperature//: The randomness of the generated completions, between 0 and 2. {{version since="1.0.1" product="LLM Application"}}Optional: when ##null## or ##undefined##, the request carries no temperature and the model provider applies its own default.{{/version}} 67 67 - //messages//: An array of message objects, each containing a //role// and //content//. 68 68 - //stream//: A boolean indicating whether to use streaming mode. 69 69 ... ... @@ -70,7 +70,7 @@ 70 70 ==== Methods ==== 71 71 72 72 - //setModel(model)//: Sets the model name after validation. 73 -- //setTemperature(temperature)//: Sets the temperature value after validation. 71 +- //setTemperature(temperature)//: Sets the temperature value after validation. {{version since="1.0.1" product="LLM Application"}}##null## or ##undefined## unsets it.{{/version}} 74 74 - //setMessages(messages)//: Sets the messages array after validation. 75 75 - //setStream(stream)//: Sets the streaming mode after validation. 76 76 - //addMessage(role, content)//: Adds a message to the messages array after validation.
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -Index for the LLM Application (BETA)1 +Index for the LLM Application - Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. ppantiru1 +xwiki:XWiki.gabrielc
- ExtensionCode.ExtensionClass[0]
-
- Description
-
... ... @@ -23,7 +23,7 @@ 23 23 * **Title**: The display name of the collection 24 24 * **Embedding Model**: The reference to the embedding model that can be configured in the models section of the AI application. This model is used to generate embeddings of parts (chunks) of the documents in the collection in order to support similarity search. By embedding the chat message in the same way, the similarity of the chat message to the documents in the collection can be calculated and the most relevant documents can be found. {{warning}}In order to use the model "Default" provided in the default list of models, you will need to install the [[Internal Inference Server>>Extension.LLM.LLM Internal Inference Server.WebHome]] extension.{{/warning}} 25 25 * **Chunking Method**: The method used to split the documents into chunks. Currently, only the maxChars method is supported, which splits the document into chunks of a maximum size with an overlap. 26 -* **Chunking Max Size**: The maximum size of a chunk in characters. {{version since="0.5" product="LLM"}}The size of a chunk must be at least 10 characters. The chunk size may be reduced to half of that size if this allows for a better splitting. The splitting prefers ending a chunk before a heading, an empty line, a line break, a sentence, or a space character. The chunking searches for these splitting points in that order and splits at the first option that yields a chunk of the configured size. For example, if the chunk size is 2000 characters, but there is a heading at position 800, the chunking continues with searching for an empty line. If there is then an empty line at position 1500, the chunk will be split at position 1500.{{/version}} 26 +* **Chunking Max Size**: The maximum size of a chunk in characters. {{version since="1.0.1" product="LLM"}}A new collection starts with 1000 characters.{{/version}} {{version since="0.5" product="LLM"}}The size of a chunk must be at least 10 characters. The chunk size may be reduced to half of that size if this allows for a better splitting. The splitting prefers ending a chunk before a heading, an empty line, a line break, a sentence, or a space character. The chunking searches for these splitting points in that order and splits at the first option that yields a chunk of the configured size. For example, if the chunk size is 2000 characters, but there is a heading at position 800, the chunking continues with searching for an empty line. If there is then an empty line at position 1500, the chunk will be split at position 1500.{{/version}} 27 27 * **Chunking Overlap Offset**: The overlap of chunks in characters. {{version since="0.5" product="LLM"}}The overlap size must not be negative and must be smaller than half of the maximum chunk size. Similarly to the maximum chunk size, the overlap may be reduced to half of the configured overlap to find a better splitting point using the same procedure as explained there, just searching from the start instead of the end of the possible overlap region.{{/version}} 28 28 * **Allow Guests**: If guests can query this collection (as part of a chat completion) 29 29 * **Query Groups**: The list of groups that are allowed to query this collection (as part of a chat completion). This is only used when guests aren't allowed to query the collection.
Approvers
Approvers have not been explicitly defined for this Change Request. Approvers will be based entirely on approval rights.
This Change Request has been marked as draft (work in progress), it can be reviewed and published only when an author decides to mark it as "ready for review".
No conflicts to show.
The change request cannot be published without valid approval or if at least one review request for changes.