Position of question mark when sentence doesn't end with question

A question within a sentence should be preceded by a comma, and end with a question mark.

I am wondering, how long has that fish statue been there?

There are three important issues that this committee must address. What was the chairman doing in that YouTube video? is not among them.

If a question is particularly long or complex, then for clarity it could begin with a capital letter.

In the daydreams of my youth I would look at the clouds and wonder, Will I find happiness and fulfillment soon after getting a business administration degree, or must I amortize my well-being return on investment over the next seven to ten calendar years?

The sentence in the original question ends with a subordinate clause that does not, by itself, ask a question (“within which we can leverage our existing knowledge”). This is modifying a noun phrase that is part of the question (“set of simple computational rules”). Therefore, this subordinate clause is part of the original question, and should end with a question mark.

Putting all of this together, I would punctuate the sentence like this:

The question nagging me is, To what extent can we encapsulate all what we observe in nature into a set of simple computational rules, within which we can leverage our existing knowledge?

(Some of this advice is based on The Chicago Manual of Style 15th Edition §6.55 and §6.71.)


You could have a question mark at the end of your sentence... if it were an interrogative one.
But I find it rather descriptive, and not so much a request for information.

However, with other punctuations, you could make it more like a dialog, in which a question would more naturally be presented:

The question nagging me is: "to what extent can we encapsulate all what we observe in nature into a set of simple computational rules, within which we can leverage our existing knowledge?"