Skip to main content
Skip table of contents

How to Create Good Queries

Prompt engineering is the process of creating a chatbot that returns the data you really want. For AI chatbots trained on very large language models, there are some tips you can use to get better information with fewer prompt attempts. Some of those techniques are useful with the AI Navigator as well.

When you create a prompt, an AI chatbot breaks down your entry into discrete parts to help it search its model. The more precise you can make your prompt, the better the chatbot is at returning the information you wanted.

Another technique for getting to the desired information is called fine-tuning. This involves adjusting the parameters and database model that the chatbot has to search. DKP fine-tunes the AI Navigator model by adding both the DKP and Insights documentation, and the DKP Support Knowledge Base. This helps to keep answers focused and fast.

What Goes in a Prompt

You can include straight text, inline code snippets such as kubectl commands, and code block snippets, within a limit of 4096 characters.

AI Navigator maintains your query history for the duration of your browser session, whether or not you close the AI Navigator application.

Inline Commands or Code Snippets

Use single back-tick marks to enclose a word, phrase, or command, for example:

CODE
What are the parameters I can use with the `dkp create cluster` command?

…creates this output in the chatbot window:

Code Blocks

Use a triple back-tick to open a code block for entry, in a manner similar to many popular chat and collaboration applications, like this:

CODE
Where do I need to use this code:
```
dkp create cluster aws \
    --http-proxy=127.0.0.1
    --https-proxy=127.0.0.2

…creates this entry and answer pair:

Selected Prompt Examples

You can use the AI Navigator to help you with a variety of tasks related to creating and managing clusters, and prompts can be fairly complex, and not necessarily limited to DKP. Consider these examples:

Evaluate a YAML Manifest

For this query:

CODE
Explain this yaml:

apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: nvidia-critical-app
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app: nvidia-critical-app

…the AI Navigator returns output like this:

CODE
This YAML file is defining a Pod Disruption Budget (PDB) for an application named
"nvidia-critical-app". 

A Pod Disruption Budget is a Kubernetes resource that specifies the minimum
number of pods that must be available during a disruption, such as a node
upgrade or maintenance. It helps ensure high availability of critical
applications by preventing too many pods from being unavailable at the same time.

In this specific YAML, the PDB is configured with the following properties:


maxUnavailable: 1: This specifies that only one pod of the "nvidia-critical-app"
can be unavailable at a time during a disruption. This ensures that at least
one pod is always available to handle requests.



selector: This specifies the labels used to select the pods that are part of
the "nvidia-critical-app". In this case, it selects the pods with the label
app: nvidia-critical-app.



Overall, this YAML is creating a Pod Disruption Budget that allows only one
pod of the "nvidia-critical-app" to be unavailable at a time during disruptions.

Links
-------
[Update Cluster Nodepools](https://beta-docs.d2iq.com/dkp/2.6/update-nvidia-gpu-cluster-nodepools)
[Setting Priority Classes in DKP Applications](https://beta-docs.d2iq.com/dkp/2.6/setting-priority-classes-in-dkp-applications)
[Project Quotas & Limit Ranges](https://beta-docs.d2iq.com/dkp/2.6/project-quotas-limit-ranges)
[Configure the Control Plane](https://beta-docs.d2iq.com/dkp/2.6/configuring-the-control-plane)

Updating a TLS Thumbprint

For this query:

CODE
How do I update a TLS Thumbprint?

…the AI Navigator returns output like this:

CODE
To update a TLS thumbprint in DKP, you need to update the following objects:

1. Update the vspherecluster object:

   - Use the command: kubectl patch vspherecluster <CLUSTER_NAME> --type=merge -p '{"spec": {"thumbprint": "<TLS_THUMBPRINT>"}}'

2. Update the vsphere-config-secret secret in the vmware-system-csi namespace:

   - Use the command: kubectl patch secret vsphere-config-secret -n vmware-system-csi --type='json'-p='[{"op" : "replace" ,"path" : "/data/csi-vsphere.conf" ,"value" : "<BASE64 Encoded>"}]'

   - Make sure to encode the value of csi-vsphere.conf in base64.

3. Update the vsphere-cloud-config configmap in the kube-system namespace:

   - Use the command: kubectl --kubeconfig <CLUSTER_NAME>-workload.conf patch cm vsphere-cloud-config -n kube-system --type=merge -p'{"data": {"vsphere.conf": "global:\n  secretName: cloud-provider-vsphere-credentials\n  secretNamespace: kube-system\n  thumbprint: <TLS_THUMBPRINT>\nvcenter:\n  <vCenter_Address>:\n    datacenters:\n    - 'dc1'\n    secretName: cloud-provider-vsphere-credentials\n    secretNamespace: kube-system\n    server: '<vCenter_Address>'\n    thumbprint: <TLS_THUMBPRINT>\n" }}'


Replace <CLUSTER_NAME>, <TLS_THUMBPRINT>, and <BASE64 Encoded> with the actual values specific to your environment.

Links
------
Updating vCenter Server TLS Certificate Thumbprint in DKP – D2iQ
Updating vCenter Server TLS Certificate Thumbprint in DKP – D2iQ

Describe Clock Skew in Ceph Cluster Status

For this query:

CODE
What is clock skew in Ceph cluster status?

…the AI Navigator returns output like this:

CODE
Clock skew refers to the difference in time between the clocks of different nodes in a Ceph cluster. In the context of a Ceph cluster, clock skew can affect the monitors, which are responsible for maintaining the cluster state. The monitors rely on a tight time alignment to coordinate with other Ceph daemons. If there is a significant clock skew between the monitor nodes, it can lead to issues in the cluster, such as inconsistent cluster maps and coordination problems. It is important to keep the time in-sync across nodes to ensure the proper functioning of the Ceph cluster.

Links
-------
How to detect if a clock skew is affecting Rook-Ceph monitors in DKP? – D2iQ
Create new cluster fails to complete due to time drift – D2iQ

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.