How can I truly know something

From the point of view of the stream of philosophers focussed on a natural view of human interactions, flowing from Stoicism through to Schopenhauer and Nietzsche, knowledge is interpretation (or memory) that produces power. To me this is the most useful form of the definition.

One framing from Nietzsche (characteristically trying to say too many things at once, but one of them being this notion):

In so far as the word "knowledge" has any meaning, the world is knowable; but it is interpretable otherwise, it has no meaning behind it, but countless meanings.—"Perspectivism." It is our needs that interpret the world; our drives and their For and Against. Every drive is a kind of lust to rule; each one has its perspective that it would like to compel all the other drives to accept as a norm.

So knowledge is made up of perspectives, each of which answers a different aspect of will and gives us a different sort of power.

This sort of view is consonant with Shannon's information theory. Information, in that context, is detectable order that can be used to predict or control a system. Knowledge, in this sense, then, is information when the prediction or control afforded addresses an actual or potential wish or need.

Basing 'knowing' on Shannons's definition of 'information' also agrees with more modern notions of science that are based upon making predictions as the primary test for knowing.

Another aspect here is that knowledge answers to a real need, or, at least, a drive evolved to fulfill a need, absent from more abstract notions of knowledge as a faculty such as the "justified true belief" definition or definitions based upon specific kinds of acts.

This captures the Montessorian notion of horme or the Lacanian notion of jouissance. Knowing is what horme reaches toward and what embeds and preserves joissance for later use. Learning and knowing are self-integrating processes that explain the mind's engagement in the world as a natural aspect of biology.

For your question, then, the question from my point of view is how is intention embedded and transferred? Do machines have needs of their own? Do the needs we build into them continue the biological process, or is there an essential disconnection between derived needs and designed ones?

For that, I would look at genes. To my mind, from this point of view, genes know things, and they think: They evaluate and manipulate information with an intention to survive in future creatures. (They do so through the insanely indirect mechanism of creating numerous whole complex creatures. But that is beside the point. They do it.)

Therefore, much of the intention that backs our own knowledge is borrowed from genes, and the idea that we pass it along to machines is not a metaphor, it is continuous with the process that lent it to us.