You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blog/notes/2024/kubernetes/index.html
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1487,6 +1487,8 @@ <h4 id="tools">Tools</h4>
1487
1487
<li><ahref="https://docs.stakater.com/reloader/">Reloader</a> can watch changes in <code>ConfigMap</code> and <code>Secret</code> and do rolling upgrades on Pods</li>
1488
1488
<li><ahref="https://karpenter.sh/">karpenter</a> Just-in-time Nodes for Any Kubernetes Cluster</li>
1489
1489
<li><strong><ahref="https://cdk8s.io/">cdk8s</a></strong> is an open-source software development framework for defining Kubernetes applications and reusable abstractions using familiar programming languages and rich object-oriented APIs</li>
1490
+
<li>Inspect all internal and external cluster communications, API transactions, and data in transit with cluster-wide monitoring of all traffic going in, out, and across containers, pods, namespaces, nodes, and clusters. <ahref="https://www.kubeshark.co/">https://www.kubeshark.co/</a></li>
1491
+
<li>A simple <ahref="https://github.com/ofirc/k8s-sniff-https?tab=readme-ov-file">mitmproxy</a> blueprint to intercept HTTPS traffic from app running on Kubernetes</li>
1490
1492
</ol>
1491
1493
<p><code>kubectl get deployments --selector=app.kubernetes.io/instance=kubesense,app.kubernetes.io/name=api -n kubesense</code></p>
1492
1494
<p>to get the deployment file that match the selector</p>
<p> By leveraging in-context learning abilities, CoT prompting encourages a language model to more effectively solve complex problems by outputting along with its solution a corresponding “chain of thought” (i.e., a step-by-step explanation for how the problem was solved). The model can be prompted to generate a chain of thought via a few-shot learning approach that provides several chain of thought exemplars; see above. The CoT technique is most effective when the map from input to output is highly non-trivial; e.g., math or multi-step reasoning problems.</p>
499
501
<p>Note: use COT for mathematical and reasoning where the perform good check out <ahref="https://arxiv.org/pdf/2409.12183">here</a> for more</p>
500
-
<h2id="auto-cot">Auto COT</h2>
502
+
<p>Prompt</p>
503
+
<pretabindex="0"><code> You are an AI assistant that uses a Chain of Thought (CoT) approach with reflection to answer queries. Follow these steps:
504
+
505
+
1. Think through the problem step by step within the <thinking> tags.
506
+
2. Reflect on your thinking to check for any errors or improvements within the <reflection> tags.
507
+
3. Make any necessary adjustments based on your reflection.
508
+
4. Provide your final, concise answer within the <output> tags.
509
+
510
+
Important: The <thinking> and <reflection> sections are for your internal reasoning process only.
511
+
Do not include any part of the final answer in these sections.
512
+
The actual response to the query must be entirely contained within the <output> tags.
513
+
514
+
Use the following format for your response:
515
+
<thinking>
516
+
[Your step-by-step reasoning goes here. This is your internal thought process, not the final answer.]
517
+
<reflection>
518
+
[Your reflection on your reasoning, checking for errors or improvements]
519
+
</reflection>
520
+
[Any adjustments to your thinking based on your reflection]
521
+
</thinking>
522
+
<output>
523
+
[Your final, concise answer to the query. This is the only part that will be shown to the user.]
524
+
</output>
525
+
</code></pre><h2id="auto-cot">Auto COT</h2>
501
526
<p>Auto-CoT paradigm to automatically construct demonstrations with questions and reasoning chains. Specifically, Auto-CoT leverages LLMs with the “Let’s think step by step” prompt to generate reasoning chains for demonstrations one by one, and sending that COT with question to LLM as few shot prompting</p>
502
527
<h2id="self-consistency-with-cot">Self-consistency with (CoT)</h2>
503
528
<h2id="react">ReAct</h2>
@@ -600,6 +625,12 @@ <h2 id="claude">Claude</h2>
600
625
</code></pre><ul>
601
626
<li>if claude saying text after json we can use stop_sequences ask the model to wrap a json with json tag like <code><json></json></code> and we can give stop_sequences as <code></json></code></li>
<p>Prompt compression is a technique used in natural language processing (NLP) to optimize the inputs given to LLMs by reducing their length without significantly altering the quality and relevance of the output.</p>
630
+
<ul>
631
+
<li>gpttrim (By tokenizing, stemming, and removing spaces)</li>
632
+
<li>LLMLingua (A LLM developed by microsoft open source which will help to reduce the prompt)</li>
633
+
</ul>
603
634
<h2id="prompt-hacking">Prompt Hacking</h2>
604
635
<h3id="output2prompt">output2prompt</h3>
605
636
<p>The core idea behind output2prompt is clever in its simplicity. By analyzing patterns in the AI’s responses, another AI can infer the instructions that produced those responses.</p>
<li><ahref="https://medium.com/the-guild/under-the-hood-of-reacts-hooks-system-eb59638c9dba">https://medium.com/the-guild/under-the-hood-of-reacts-hooks-system-eb59638c9dba</a> How hooks works under the hood</li>
0 commit comments